Note that there are some explanatory texts on larger screens.

plurals
  1. POJSON AND TABLEVIEW DRILL DOWN
    primarykey
    data
    text
    <p>I have three uitableviews with navigational controller. Each tableview is populated by arrays through JSON. In mySQL table i have categories, then items such as City and then more details about the city. A user can be able to select a city and get the list of the cities plus the photos of that city, but I want that when they click that city, they should be able to see more information such as; names of the towns, and when they click any name of the town, it should bring them train times, buses times and taxis, which will further give the details of each.</p> <pre><code>-(void)dataRetrieveMethod { NSURL *url=[NSURL URLWithString:urlRetieval]; NSData *data= [NSData dataWithContentsOfURL:url]; json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:Nil]; //instantiate arrays to hold data citiesArray=[[NSMutableArray alloc] init]; for (int i=0; i&lt;json.count; i++) { NSString *ids = [[json objectAtIndex:i] objectForKey:@"id"]; NSString *cityName = [[json objectAtIndex:i] objectForKey:@"cityName"]; City *myCity=[[City alloc] initWithCityID:ids CityName:cityName ]; [citiesArray addObject:myCity]; } [self.myTableView reloadData]; } </code></pre> <p>This gives me the list of cities</p> <p>how do i also store and retrieve the names of the town so that i can have something like this</p> <p>LONDON ------- [[Stratford] [.......trains ......buses ......taxi]] -------- [[Mile End] .......trains ......buses ......taxi] ---------[[Leyton] .......trains ......buses ......taxi] <img src="https://i.stack.imgur.com/HT9Dc.png" alt="picture here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload