I am trying to get an array o keys from a dictionary where the array is sorted by values. For example:
//dictionary contains [alpha:C],[beta:A],[gamma:B]
My array should return:
//[beta, gamma, alpha]
I tried:
let keys = Array(myDictionary.keys).sort({ (a,b) -> Bool in
a.compare(b) == .OrderedAscending
})
but this returns the order by keys:
//[alpha, beta, gamma]
