views:

43

answers:

1

Hi chaps, I have an array of nsdictionaries and one key is ID (which is unique) I simply want to see if the the array of dictionaries contains a specific ID.

Really simple but its friday and after statiny up watching the election i think my brain is melting. Any help would be great.

Thanks

+1  A: 
NSArray *arrayOfDicts = /*...*/ ;
for (NSDictionary *currentDict in arrayOfDicts)
    if ([[currentDict valueForKey:@"ID"] isEqualToString:@"The ID you are searching for"])
        // Do your stuff.
bddckr