SWIFT 2: Loop through JSON array

前端 未结 4 1374
孤城傲影
孤城傲影 2020-12-09 05:01

I am getting this json from a url, the return JSON is:

[{\"id\":1,\"name\":\"Mary\"},{\"id\":2,\"name\":\"John\"}]

I want to display the n

4条回答
  •  感情败类
    2020-12-09 05:49

    let jsonResult: AnyObject? = NSJSONSerialization.JSONObjectWithData(data,
      options: NSJSONReadingOptions.AllowFragments,
      error:&parseError)
    

提交回复
热议问题