I have this array of names (listedName) that I want to filter out and remove in fbFriends array. How I can do it? Seems my clause is not working.
// add "names" to listed name array
NSMutableArray *aTempFriendList = [[NSMutableArray alloc] init];
for (int n = 0; n < [[self friendsList] count]; n++) {
NSDictionary *dFriend = [[self friendsList] objectAtIndex:n];
NSString *sName = [dFriend objectForKey:@"name"];
[aTempFriendList addObject:sName];
}
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(name not in %@)", aTempFriendList];
[fbFriends filterUsingPredicate:predicate];
It should be @"not (name in %@)".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With