i am currently working on Core Data and i have following code
NSManagedObjectContext *managedObjContxt = [self managedObjectContext];
NSFetchRequest *fetchReq = [[NSFetchRequest alloc] initWithEntityName:@"BDEvent"];
NSMutableArray *fetchedObj= [[managedObjContxt executeFetchRequest:fetchReq error:nil] mutableCopy];
Now my fetchedObj array contains
<_PFArray 0x7b78d4e0>(
<BDEvent: 0x7b78cf40> (entity: BDEvent; id: 0x7b78be60 <x-coredata://066794C5-FA98-4D76-B306-C62CF65563F2/BDEvent/p1> ; data: {
name = rock;
status = "D1";
timestamp = "18-02-2015 12:10:10";
}),
<BDEvent: 0x7b78d1f0> (entity: BDEvent; id: 0x7b78be70 <x-coredata://066794C5-FA98-4D76-B306-C62CF65563F2/BDEvent/p2> ; data: {
name = Illa;
status = "D1";
timestamp = "18-02-2015 12:15:01";
}),
<BDEvent: 0x7b78d290> (entity: BDEvent; id: 0x7b78be80 <x-coredata://066794C5-FA98-4D76-B306-C62CF65563F2/BDEvent/p3> ; data: {
name = john;
status = "EXIT|D2";
timestamp = "18-02-2015 12:25:05";
})
)
Now i want to create 2 array based on status
Array1 will contain timestamp value which does not have EXIT status and Array2 will contain timestamp value which does have EXIT status.
How to achieve this ?