I’m loading Json into an NSDictionary and the output is below. I’m just not to sure on how to parse it so I can insert it into a UItableview so the first row will say 6 street 10950 and the second row will say Munch lane 11730 and so on. Thank you for your help.
(
{
"address_line1" = "6 street";
"zipcode" = 10950;
},
{
"address_line1" = "Munch lane";
"zipcode" = 11730;
}
)
Assuming you ran it through a json parser such as NSJSONSerialization, you now have an NSArray of NSDictionarys. Implement the UITableViewDatasource method
cellForRowAtIndexPathin your UITableView or UITableViewController class:(This assumes you set the property ‘jsonAddressArray’ to your parsed JSON data.)
This puts the address line 1 on the first line of the cell, and the zip code on the second line of the cell. If you want both on one line, change the cell style to
UITableViewCellStyleDefault, combine the two strings and setcell.textLabel.textto that string.