私のjsonの攪拌は次のとおりです。
{
"locations" :[
{
id = 0;
lat = "41.653048";
long = "-0.880677";
name = "LIMPIA";
},
{
id = 1;
lat = "41.653048";
long = "-0.890677";
name = "LIMPIA2";
}
]
}
使用:
NSDictionary * root = [datos_string1 JSONValue];
NSArray *bares = (NSArray *) [root objectForKey:@"locations"];
for (NSArray * row in bares) {
NSString *barName1 = [bares valueForKey:@"name"];
NSLog(@"%@",barName1);
}
NSlog から取得し、2 回 otput ( LIMPIA、LIMPIA2 )
だから何かが間違っている。(マップキット アプリで使用するために) 各アイテムの単一値パラメーター (lat、lon、nombre) を抽出する必要があります。私たちを手伝ってくれますか?