I have an array of dictionaries and I want to sort them alphabetically by the \"itemName\" key in each dictionary. How can I do this in Swift?
I want to sort the ite
This worked for me:
let descriptor: NSSortDescriptor = NSSortDescriptor(key: "itemName", ascending: true) let sortedResults: NSArray = favArray.sortedArray(using: [descriptor]) as NSArray