Reputation: 237
I am trying to use swiftyJSON for JSON that is stored in a parse column...
I can print out the JSON I'm trying to access..but none of my "if let" statements are printing anything to the logs...hopefully you can help thanks!
this is what I've tried so far..
Upvotes: 0
Views: 40
Reputation: 4186
As I can see from your model, you have an array of such entries. You need to enumerate this array before getting string values from there. This code works:
for (_, entry) in thisJSON {
if let success = entry["freeChlorine"].string {
println(success)
}
}
Upvotes: 1