An Array with multiple information per index (an array of arrays???) (OBJ-C) : I am currently making a demo app which is calling a web api (following a tutorial that uses meetup.coms API's). I am passing the information into a tableview to display it and whilst making it I was thinking about this.

Can I make an array that has multiple pieces of data per row?

Almost like an excel spreadsheet so rather than having

    NSArray *sampleArray1 = @[@"Name1",@"Name2",@"Name3"];
    NSArray *sampleArray2 = @[@"Age1",@"Age2",@"Age3"];

and having to return the `[indexPath row]` of each array into your table view cell, you could instead have:

    NSArray *superArray = @[@"Name1"|@"Age1", @"Name2"|@"Age2",@"Name3"|@""];

which would return all of your information for the selected index at once.

I am familiar with how you could do this in swift. I would normally create a `struct` and give it a few array variables.

    struct superArray {
    var names = [String]()
    var ages = [String]()
    }`

and I could simply do `cell.myLabel = superArray.names.indexPath[row]` (I might be getting some syntax wrong, I've not ran this through xcode.

When I setup my tableview I need to return something for the number of rows the table should display. Currently in my Objc project I have just implemented dummy arrays and all the arrays are the same size, I'm returning only one of these. This in my eyes is bad because I could retrieve a dataset with incomplete parameters (maybe an age but not a name) then my table will see the wrong amount of information in my array and not display correctly.

I almost want to return the struct's array count and have NO idea how I would do this. And I don't know how to do this in swift.. and I need to do this in objective c (since i've started working on an app that uses objc so I need all the practise I can get).

Currently my tableview works and I can populate the table with a dataset pulled from the web. I'm just thinking about defending my implementation from incomplete datasets and trying to 'theorycraft' the best solution to this problem.

If anyone has any suggestions I am all ears!
I'd prefer answers in objective c, but if you can explain the concept better in swift go for it, I can always try converting it over! 

Cheers :)

As an end note: I have used matlab alot and I know you can basically tell an array to have a certain number of columns. So for example your array could have 4 columns per row all with different pieces of information per indexPath row (if that makes sense). I did alot of audio in matlab so maybe this 4 column array is a BFormat impulse response with 44100 samples (datapoints) and 4 numbers per sample (for WXYZ channels). 

so as an example sample(row) 1 would return [0.123,-1.230,1.765,0.873] and sample (row) [1.322,-3.478,-0.311,0.421] (all random numbers)

You can specify in matlab which row to access AND which column to access, can this principle be extended into objc/swift/ios development?