You are fetching JSON, and then parsing it. OK.
You have to know your JSON layout, and then just pick your data from the resulting object. It looks like you are doing something like that. However, you are assigning the result to mutable objects. You can't do that as those API return immutable objects.
If you want a mutable version, you need to call mutableCopy
...
NSMutableDictionary *routeRes;
routeRes = [[json objectForKey:@"AirlineFlightSchedulesResult"] mutableCopy];
This, of course, assumes that your JSON is holding a dictionary for the key "AirlineFlightSchedulesResult". There is no explicit check being done for you. It is assumed that you know what type of object you are asking for.
You will then just need to convert your data into an array, where you have one item in the array for each item you want in the table view, and use the standard table view API.
However, from your code, it does not look like you really want a mutable dictionary, you just want to put stuff into the array. Consider this...
NSMutableArray results = [NSMutableArray array];
NSDictionary *routeRes = [json objectForKey:@"AirlineFlightSchedulesResult"];
NSArray *res [routeRes objectForKey:@"data"];
for(NSDictionary *flight in res)
{
// Put whatever you want into your array.
[results addObject:[MyFlight flightWithDictionary:flight]];
}
Now, results
will be an array of MyFlight
objects, each created by the factory method flightWithDictionary
.