0

I Xcode, I can see the value for item.body(). and then iterate each of the user. but I can not get the value for users. Please see the attached image. Thanks! enter image description here

1

1 Answer 1

5

form item.body() you are getting a dictionary of [NSObject:AnyObject]. You have to cast that to what you expect the dictionary to look like. I assume here it's [String:AnyObject] so do:

let myStringDict = item.body as? [String:AnyObject]

the you can access they value for the key "users" like:

myStringDict?["users"]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.