Search code examples
iosobjective-cxcodensarray

Multi Dimensional NSArray to NSArray?


Firstly refer to the graphic show below:

enter image description here

I have an NSArray that contains 9 Elements. Each of these 9 elements contain a further 5 Elements.

What I would like to do is take the [*][1] from each an place them into another which will only contain these dates.

How is this best achieved ??


Solution

  • NSMutableArray * results = [@[] mutableCopy];
    
    for (NSArray *details in self.fuelDetailsForSelectedBike){
        [result addObject:details[1]];
    }