I have an array of dictionaries. Within each dictionary, there is a a key dateOfInfo
(an NSDate
) and several other things. I want to sort the array
The basic bubble sorting algorithm would work. In this case you need to loop through your array, use valueForKey message on [array objectAtIndex:] to get the NSDate values. For comparing dates see this post . So if you are sorting in ascending order of date, just add the object with the lower date (remember bubble sort comparisons?) to an array which will hold your sorted result.