Remove duplicates from array comparing the properties of its objects
Suppose I have a class Event, and it has 2 properties: action (NSString) and date (NSDate). And suppose I have an array of Event objects. The problem is that "date" properties can match. I need to remove the duplicates, meaning that 2 different objects with the same date IS a duplicate. I can remove duplicates in any array of strings or nsdates, they are easy to compare. But how to do it with complex objects, where their properties are to be compared? Don't ask me what I did so far, cos' the only thing coming in my mind is a bubble sort, but it's a newbie solution, and slow . Quite any help is