作爲標題表明我試圖從JSON填充UITableView。我得到的JSON對象,它看起來像填充UITableView嵌套JSON
{
applications: {
iphone: {
application: [
{
title: "Title",
},
{
title: "Title2",
},
{
title: "Title3",
}
]
}
}
}
它繼續這樣,有幾個title
領域嵌套應用程序內部。
我想用所有的標題爲我的電池標籤。 我能得到像這樣
for (int i = 0; i < 10; i++)
{
titleString = [[[[[result objectForKey:@"applications"] objectForKey:@"iphone"] objectForKey:@"application"] objectAtIndex:i] objectForKey:@"title"];
NSLog(@"title %@", titleString);
}
它不工作,在我可以登錄標題的列表清單...但我知道我在錯誤的道路要對此,我甚至不能找出myArray將在return [myArray count]
的numberOfRowsInSection
方法中......完全丟在這裏!幫助表示讚賞!
您的JSON對象看起來不完整的。 – Jake1164
這是真的,因爲我爲了清楚起見而切斷它。我成功地檢索了應用程序中的JSON。 – sixstatesaway
發佈一些完整的json –