I plan to retrieve the score of my current user. Here is my code. Thanks in advance.
let query = PFQuery(className: "UserData")
query.whereKey("user", equalTo: "cuWkby3Fm0")
query.findObjectsInBackgroundWithBlock {
(objects: [PFObject]?, error: NSError?) -> Void in
if error == nil {
print("successfully retrieved \(objects!.score) ")
} else {
print("Error: \(error!) \(error!.userInfo)")
}
The error is
Value of type '[PFObject]' has no member 'score'

objects![0]["score"]