You can order them by having keys with type Int
.
var myDictionary: [Int: [String: String]]?
or
var myDictionary: [Int: (String, String)]?
I recommend the first one since it is a more common format (JSON for example).
More Related Contents:
- Swift – static let and "<<" meaning
- When should I compare an optional value to nil?
- Swift 2.0 – Binary Operator “|” cannot be applied to two UIUserNotificationType operands
- Protocol can only be used as a generic constraint because it has Self or associatedType requirements
- stringByAppendingPathComponent is unavailable
- Swift – Stored values order is completely changed in Dictionary
- Using NSUserDefaults on arrays
- Draw text along circular path in Swift for iOS
- Array from dictionary keys in swift
- How to find file UTI for file, withouth pathExtension, in a path in Swift
- [NSObject : AnyObject]?’ does not have a member named ‘subscript’ error in Xcode 6 beta 6
- Decimal to Fraction conversion in Swift
- Sort Array of Dictionaries by Key Value
- Swift equivalent to `[NSDictionary initWithObjects: forKeys:]`
- Type ‘Any’ has no subscript members (firebase)
- Swift Modal View Controller with transparent background [duplicate]
- How to embed a Youtube video into my app?
- How can I build a URL with query parameters containing multiple values for the same key in Swift?
- Set image and title for bar button item?
- How can I combine two Dictionary instances in Swift?
- How to present view controller from right to left in iOS using Swift
- Xcode 7 Swift 2 impossible to instantiate UIViewController subclass of generic UITableViewController
- How to Read Plist without using NSDictionary in Swift?
- Ambiguous use of subscript xcode 7.1
- Swift iAd – More than 10 instances of ADBannerView warning and CGAffineTransformInvert: singular matrix output
- Adding blur effect to background in swift
- BLE Peripheral disconnects when navigating to different ViewController
- Why would a `scheduledTimer` fire properly when setup outside a block, but not within a block?
- Can we detect whether a user left through the home button or lock button without listening to darwin notifications?
- UIDevice currentDevice model possible values