There is an Array with each element being a NSDictionary
.
NSMutableArray *mutArr = [NSMutableArray array];
for (Person *person in persons) {
NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:person.name, @"name", person.email, @"email", nil];
[mutArr addObject:dict];
}
self.arr = [[NSArray alloc] initWithArray:mutArr];
How to filer the arr
with name or email contains string @"filter string"
by using filterArrayUsingPredicate:
method.
Thanks in advance!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…