iPhone - Merge keys in a NSArray (Objective-C)
Posted
by ncohen
on Stack Overflow
See other posts from Stack Overflow
or by ncohen
Published on 2010-04-18T19:52:07Z
Indexed on
2010/04/18
19:53 UTC
Read the original article
Hit count: 497
Hi everyone, I'm having troubles with arrays and keys... I have an array from my database:
NSArray *elementArray = [[[menuArray valueForKey:@"meals"] valueForKey:@"recipe"] valueForKey:@"elements"]
The problem here is that I would like all my elements of all my meals of all my menus in an array such that:
[elementArray objectAtIndex:0] = my first element
etc...
In the example above, the elements are separated by the keys.
How can I get that?
Hope it's clear enough...
Thanks
© Stack Overflow or respective owner