iphone - Getting length of an array inside a Dictionary Key -


i'm sure obvious question i'm not getting anywhere , i've been trying half hour or now.

i have nsmutabledictionary has keys & values, obviously. each key stores array of objects. need find specific array in key , list of array. catch don't know value of key, know it's index. (eg: know need find array in 2nd key).

i easy & trivial thing it's escaping me, i've been doing obj-c short while not entirely @ home yet!

thanks,

jack.

use allkeys: access keys of dictionary.

- (nsarray *)allkeys 

use below .

    nsarray* dictallkeys = [dict allkeys];     if([dictallkeys count] > 2)     {       nsarray* myarrayindict = [dict objectforkey:[dictallkeys objectatindex:1]];       // length of array in dict @ 2nd key       int length = [myarrayindict count];     } 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -