SwiftyJSON
SwiftyJSON copied to clipboard
I cant get a string from my json

i get the notification and wana get the loc_key in data. it gets the data correctly but cant get the loc_key , i dont know what is the problem!
It seems like "data" is String but not Dictionary as was expected. You can use another initializer in this case:
guard let data = userInfo["data"] as? String else {
return
}
let resultJson = JSON(parseJSON: data)
Hi, I think that the solution of @svallex, is perfect for this problem.