针对这段json
{
"song": [
{
"picture": "http://img3.douban.com/lpic/s4223250.jpg",
"artist": "伍思凯"
},
{
"picture": "http://img3.douban.com/lpic/s4223250.jpg",
"artist": "伍思凯"
}
]
}
用下面的方法可以数组
varjsonResult:NSDictionary= NSJSONSerialization.JSONObjectWithData(data, options: NSJSONReadingOptions.MutableContainers, error: nil) asNSDictionary
self.data1 = jsonResult["song"] as NSArray
self.table1.reloadData()