objective c - how can I retrieve values from NSMutableArray having object with multiple values -
i have nsmutablearray
has 4 objects, , each object has further elements in it, want retrieve elements i.e.
object @ index 0 has 15 values( ns strings) same rest of 3 objects
i don't know syntax of how can read values below syntax have tried gives me error:
for(int i=0 ; i<[array count] ; i++) { (int j=0 ; j<[array[i] count] ; j++) { /// reading code here } }
very simple example 2 inner arrays containing 3 items respectively , fast enumeration:
nsarray *array = @[@[@"1", @"2", @"3"], @[@"4", @"5", @"6"]]; (nsarray *subarray in array) { (nsstring *item in subarray) { nslog(@"%@", item); } }
Comments
Post a Comment