user6032625 user6032625 - 11 months ago 35
Swift Question

How do I gain access to the info inside a PFObject?

I am importing the objects from parse, but I need to gain access to the information inside. The object has the name and the address of a user, and I need to get those. How would I do that?

let query = PFQuery(className: "People")
query.findObjectsInBackgroundWithBlock { (objects: [PFObject]?, error: NSError?) in
if(error == nil){
for object in objects!{




Would I do something like
, I don't think that is the correct syntax for a PFObject.


Just make a loop to access the single object and then fetch value like below:

for Oneobject in objects
   let strAddress = Oneobject["address"] as String
   let strName = Oneobject["name"] as String

Refer the following link: