Reputation: 345
Hi I have two NSArrays containing NSDictionaries. I how can I check if a dictionary in array a is also in array b? I have an id key in the dictionaries.
Upvotes: 0
Views: 197
Reputation: 3579
You can use the NSArray method containsObject: in a loop to check this Doc says:
containsObject: Returns a Boolean value that indicates whether a given object is present in the array.
- (BOOL)containsObject:(id)anObject
Parameters anObject An object. Return Value YES if anObject is present in the array, otherwise NO.
Upvotes: 1