I have a NSMutableArray
like this.
[
{
"Employee": {
"EmployeeCode": 17125,
"DisplayName": "MI0000026 - ABC",
"DisplayName2": "ABC2",
"Initials": "W. S. S.",
"Surname": "CCC",
"FirstName": "ABC",
"MiddleName": "CDE",
"LastName": "",
"FullName": "ABC EMPLOYEE",
},
"LeaveDetail": {
"LeaveDetailId": 21,
"LeaveEntryCode": 16,
"RequestId": 20,
"EmployeeCode": 17125,
"LeaveYear": 2016,
"LeaveTypeCode": 1,
"BaseType": "ess",
"LeaveDate": "2016-09-05T00:00:00",
}
}
]
there are several objects in this array which has these kind of dictionaries. I want to find all the objects in this array which has "LeaveDate": "2016-09-05T00:00:00"
this LeaveDate key is inside the LeaveDetail
dictionary. How can I find all the objects which has LeaveDate as "2016-09-05T00:00:00"
EDIT
NSPredicate *predicate=[NSPredicate predicateWithFormat:@"LeaveDate CONTAINS[cd] %@",dm.strClickedDate];
But, I don't get any result.
Please help me. Thanks