1

I want to filter an array from another array which contain custom objects. Below example of dictionary.

NSArray *ContactsArray = [mainArray valueForKey:@"phoneNumber"];

I have tried with

NSPredicate *predicate = [NSPredicate predicateWithFormat:@"phoneNumber IN %@",mainArray];

NSArray *ContactsArray = [array2 filteredArrayUsingPredicate:predicate];
  • please see this link, i hope this will help you... http://stackoverflow.com/questions/27810365/filter-nsarray-based-on-another-array-using-predicate –  Feb 21 '16 at 05:27

0 Answers0