let dict: [String:Int] = [\"apple\":5, \"pear\":9, \"grape\":1]
How do you sort the dictionary based on the Int value so that the outp
Int
It can be achieved by using the below implementation
let sortedDictionary = unsortedDictionary.sorted{$0.key > $1.key}