[英]iphone JSON Parsing.. How can i parse this data
这是nsmutablearray的打印屏幕。
此2409、2410、2412不是固定密钥。 它动态地来了。
{
2409 = (
{
AltSelectionPrice = "2.00";
},
{
AltSelectionPrice = "3.00";
}
);
2410 = (
{
AltSelectionPrice = "7.00";
},
{
AltSelectionPrice = "0.00";
}
);
2412 = (
{
AltSelectionPrice = "0.00";
},
{
AltSelectionPrice = "9.00";
},
{
AltSelectionPrice = "5.00";
}
);
}
提前thnx。
我目前在运行Windows的工作计算机上,因此无法发布确切的代码。 但是您需要做的是在数组中保留字典。 可能如下所示:
NSDictionary* dict = [myMutableArray objectAtIndex:0];
然后遍历字典中的键:
for (id key in [dict keyEnumerator]) {
//use the key or get the object of that key using [dict objectForKey:key]
}
更新 :我假设您是从JSON解析器获取此数组的!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.