首先要导入SwiftyJSON
pod 'SwiftyJSON'
let rowsDic:Dictionary = res["rows"].dictionaryValue
可以打印
print(rowsDic["fenceAreaDO"]?.dictionary == nil)
print(rowsDic["fenceCircleDO"]?.dictionary == nil)
print(rowsDic["fencePolygonDO"]?.dictionary == nil)
if rowsDic["fenceCircleDO"]?.dictionary == nil {
print("这是空的")
return
}
网友评论