我是 iOS 和 JSON 解析的新手,我正在获取一些 JSON 数据,例如,
[
{
"id":3,
"name":"SCORM 0",
"visible":1,
"summary":"",
"summaryformat":1,
"modules":[
{
"id":1,
"url":"http:\/view.php?id=1",
"name":"Course01",
"visible":1,
"modicon":"http:\theme\/image.php\/standard\/scorm\/1378190687\/icon",
"modname":"scorm",
"modplural":"SCORM packages",
"indent":0
},
{
"id":2,
"url":"http:\/\/192.168.4.196\/moodle\/mod\/forum\/view.php?id=2",
"name":"News forum",
"visible":1,
"modicon":"http:\//image.php\/standard\/forum\/1378190687\/icon",
"modname":"settle",
"modplural":"Forums",
"indent":0
}
]
},
{
"id":2,
"url":"http:\/\/view.php?id=2",
"name":"News forum",
"visible":1,
"modicon":"http:\/\theme\/image.php\/standard\/forum\/1378190687\/icon",
"modname":"forum",
"modplural":"Forums",
"indent":0
}
]
我需要将数据分开"modname" != "forum"
并将相应的数据存储在数组中。
帮助和解决方案将不胜感激。