let unsorted = [{Name:Amy,age:20},{Name:Bill,age:20}]
let sortedDict = sorted(unsorted){a,b in return a.Name < b.Name}
How can I sort the unsorted array according to the Name key? Above code seems doesn't work.
See Question&Answers more detail:os