如何使用SwiftyJSON从多个对象和数组的JSON读取值

时间:2016-08-16 08:24:29

标签: json swift swifty-json

我有这个JSON,我想使用SwiftyJSON库访问这些值:

{"user":[{"id":"33","id_number":"0","first_name":"tom","last_name":"lily","city":"jeddah","gender":"0","DOB":"0000-00-00","phone_namber":"0000000000","email":"000"},
{"id":"34","id_number":"0","first_name":"tom","last_name":"lily","city":"jeddah","gender":"0","DOB":"0000-00-00","phone_namber":"0000000000","email":"000"}]}

此JSON包含数组和对象。当我尝试这个时,它不起作用:

JSON["lawyers"]["id"].intValue

如何访问此JSON中的id和其他值?

0 个答案:

没有答案