- 如果JSON数据是字典类型(Dictionary
for (key,subJson):(String, JSON) in json[0] {
print("\(key):\(subJson)")
}
- 如果JSON数据是数组类型(Array)
for (index,subJson):(String, JSON) in json {
print("\(index):\(subJson)")
}
for (key,subJson):(String, JSON) in json[0] {
print("\(key):\(subJson)")
}
for (index,subJson):(String, JSON) in json {
print("\(index):\(subJson)")
}
本文标题:Swift - SwiftyJSON
本文链接:https://www.haomeiwen.com/subject/vyaqrftx.html
网友评论