I'm working on an iOS project in swift 4. I have an array of dictionarylike
var myArray = [[String: AnyObject]]()
The dictionary contains, name, age created_at(date in string), nationality etc.. And I need to sort the myArray with the ascending order of 'created_at' key which is string format of date. How can I do that? Please help me. I checked all solutions, but i didnt get the sorted array.
my array is like,
(
{
name: X
age: 26
created_at: "1991-10-10 18:29:05"
nationality: Indian
},
{
name: Y
age: 30
created_at: "2000-05-10 18:29:05"
nationality: Indian
},
)