【发布时间】:2012-01-27 09:17:16
【问题描述】:
我的 JSON 响应如下所示:
{
"themes": [
[
"Direction des Routes Secteur de Pithiviers ",
"mairies",
"Morailles 45300 PITHIVIERS LE VIEIL ",
"0238345744",
"48.823042",
"2.365907"
],
[
"Crédit Mutuel Du Centre ",
"banques",
"agence de Pithiviers 33 r Am Gourdon 45300 PITHIVIERS",
"0820834080",
"48.703042",
"2.145907"
]
]
}
如您所见,所有的键都是未知的,我没有Key:value,所以,我如何引用每个值。
NSDictionary *allThemesDict=[[request responseString]JSONValue];
NSArray *allThemesValues=[allThemesDict objectForKey:@"themes"];
for (int i=0; i<[allThemesValues count]; i++) {
NSDictionary *currentTheme=[allThemesValues objectAtIndex:i];//here i get the first 6 values, how can i display it?
}
【问题讨论】:
标签: objective-c ios json nsarray nsdictionary