i have an array of dictionay in the following format
[
{
\"student\": {
\"id\": \"1\",
\"studentUserDetail\": {
\"firstName
NSArray *array = @[
@{
@"student": @{
@"id": @"1",
@"studentUserDetail": @{
@"firstName": @"Bonny",
@"lastName": @"Roby"
}
}
},
@{@"student": @{
@"id": @"1",
@"studentUserDetail": @{
@"firstName": @"Bonny",
@"lastName": @"Kety"
}
}
},
@{
@"student": @{@"id": @"1",
@"studentUserDetail": @{
@"firstName": @"Arther",
@"lastName": @"Fone"
}
}
}];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"(student.studentUserDetail.firstName) == %@", @"Bonny"];
NSArray *newArray = [array filteredArrayUsingPredicate:predicate];