I have an array of entity class (eg SubmittedAnswer). Its JSON format is look like as below.
{
\"submittedAnswers\": [{
\"submittedQuestionId\": \"C7B3
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"submittedQuestionId == %@", yourSubmittedQuestionId];
NSArray *filteredArray = [myArray filteredArrayUsingPredicate:predicate];
id firstFoundObject = nil;
if ([filteredArray count] > 0) {
firstFoundObject = [filteredArray objectAtIndex:0];
}
Please make sure your SubmittedAnswer
class has property submittedQuestionId