-5

I have a dictionary with keys in format: [1:ABC, 113:NUX, 78:BUN, 34:POI, 223:NTY]

When I sorted the array of keys, i get the sorted key array as: [1:ABC, 113:NUX, 223:NTY, 34:POI, 78:BUN]

But I want the sorted array as: [1:ABC, 34:POI, 78:BUN, 113:NUX, 223:NTY]

what am I missing here? what additional sort should I add? * I am using Swift 2

1 Answers1

-1

i got the answer:

let arrSortedKeys = keys.sort{$0.localizedStandardCompare($1) == NSComparisonResult.OrderedAscending}