我的 json 响应数据格式为:-
[{"0":"1","id":"1","1":"Pradeep","name":"Pradeep","2":null,"sender":null,"3":null,"
那么解析表格视图上的“名称”?
我自己的实现是: -
我是ios开发新手,请帮助我
-(void)connectionDidFinishLoading:(NSURLConnection *)connection
{
NSDictionary *allDataDictionary=[NSJSONSerialization JSONObjectWithData:webData
options:0 error:nil]; // response saved in allDataDictionary
NSDictionary *feed=[allDataDictionary objectForKey:@"feed"]; // feeds entry
NSArray *feedforentry=[feed objectForKey:@"entry"];
for(NSDictionary *diction in feedforentry)
{
NSDictionary *title=[diction objectForKey:@"title"];
NSString *label=[title objectForKey:@"label"];
[array addObject:label];
}
[[self JustConfesstable]reloadData]; // reload table
}