Currently, I have a nested dictionary declared as
var userSchedule = [String:[String:String]]()
I get results like:
["2": ["time": "tbd", "date": "1/15", "name": "Chris"],
"0": ["time": "6:16 PM", "date": "1/15", "name": "Bob"],
"1": ["time": "1:15PM", "date": "1/15", "name": "John"]]
I want to sort this result so that the results would be in order by the first key.
So:
["0": ["time": "6:16 PM", "date": "1/15", "name": "Bob"],
"1": ["time": "1:15PM", "date": "1/15", "name": "John"],
"2": ["time": "tbd", "date": "1/15", "name": "Chris"]]
How could I efficiently do this in Swift4? Please help!