This is more a open question than an error-related question, so if you don’t like to answer these kinds of questions, please don’t flame.
I have a huge (!) list of ships in a .csv file, separated by ,
The matrix is organised like this:

repeated with different data about 500 times.
Now, I want this to be read into objects, which can be used further to populate a UITableView
Currently, I hard-code data into the object files, like this
arrayWithObjectsForTableView = [[NSMutableArray alloc] init];
if ([boatsFromOwner isEqualToString:@"Owner1"]) {
cargoShips* ship = [[cargoShips alloc]init];
ship.name = @"name1";
ship.size = 1000;
ship.owner = @"Owner1";
[self.boatsForOwner addObject:ship];
ship = [[cargoShips alloc]init];
ship.name = @"Name 2";
ship.size = 2000;
ship.owner = @"Owner2";
And so on and on with if-else’s. This is a bad method, as
1) Its boring and takes a long time
2) It takes even more time if I want to update the information.
So, I figured it would be smarter to read programmatically from the matrix instead of doing it myself. Yeah, captain obvious came for a visit to my brain.
So, to the question!
How can I read the .csv file that looks like this:

add the ships of, say, owner, to a NSMutableArray, in the shape of objects. (So they can be used to feed my UITableView with ships.
I would also like to have the option to sort by different stuff, like Country of build, Operator etc. How can I make code that feeds relevant ships read from the .csv into objects?
I don’t know much programming, so in-depth answers would be very appreciated.
The depth of your processing will determine what sort of data structure is required for this task. This is the method I would use:
1: Read the
.csvfile into one giantNSStringobject:2: Get the individual lines:
3: For each line, get the individual components:
4: This is where it’s up to you. My first thought would be to create a class to store all your data. For example:
4a: Then, back in step 3 create a
Recordobject for each line and then put all the Record objects into a separateNSArray(something with larger scope!).5: Use your
NSArraythat contains all yourRecordobjects as the data source for yourUITableView.The implementation of Steps 4 and 5 are up to you. That’s probably how I would do it though for a medium sized
.csvfile.EDIT: Here’s how to generate the
Records.