In my debugger this is how my log statement is printing my messages object:
self.messages = (
\"
this is a simple NSArray which contains objects of type named lean. you can get the needed object by its index
UPDATE:
I can't be sure of course. I have no idea about lean's structure. But most likely it contains field (and I assume it must be a property) named messageBody. If it is really so then you can do the following:
NSMutableArray* messagesBySenderName = [NSMutableArray new];
for (id lean in objects)
{
NSDictionary *messageBody = [lean valueForKeyPath:@"messageBody"];
if ([lean[@"senderId"] isEqualToString:@"Hoy7UjLzOh"])
{
[messagesBySenderName addObject:messageBody];
}
}
Again - it is only an assumption. In no case I can guarantee it will work