I have an array which stores custom objects. Objects are of type Venue which have a property defined as name(which contains the names of venue).
Now I want to filter out objects with unique names.
This is how I was trying to do.
NSSet *uniqueVenuesSet = [NSSet setWithArray:[venueArray valueForKey:@"name"]];
NSMutableArray *uniqueVenues = [[NSMutableArray alloc] initWithArray:[uniqueVenuesSet allObjects]]
;
I get this error when I run this.
-[NSCFString name]: unrecognized selector sent to instance 0x69a6190
2010-10-24 09:25:31.832 [75790:207] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFString name]: unrecognized selector sent to instance 0x69a6190'
Can anyone give me a pointer on how to go about it.