Is there any built-in way to create an ordered map in Swift 2? Arrays [T] are sorted by the order that objects are appended to it, but dictionaries
[T]
Just use an array of tuples instead. Sort by whatever you like. All "built-in".
var array = [(name: String, value: String)]() // add elements array.sort() { $0.name < $1.name } // or array.sort() { $0.0 < $1.0 }