0
我想嘗試按NSMutableDictionary
的值排序,其中的密鑰是price
,其中NSMutableArray
的人是。如何根據NSMutableDictonary的值對NSArray進行排序
這樣的...
people = [
["price" => 133, "name" => "banana"],
["price" => 333,"name" => "apple"],
["price" => 3, "name" => "orange"],
]
我想是這樣的:
copiedPeople = [
["price" => 3, "name" => "orange],
["price" => 133,"name" => "banana"],
["price" => 333, "name" => "apple"],
]
你有什麼想法?
謝謝!這個很酷! – nobinobiru