I want to get back data in \"requestActive\" in \"User\" on Parse.t
I try this :
var user = PFUser()
var requestActive = user[\"requestActive\"]
<
You are declaring user
at the top level of your view controller.
But then, still at the root level, you try to use it with user["requestActive"]
: you can't do that.
You have to use user
in a method, for example viewDidLoad
.
So let's say the type of user["requestActive"]
would be a String (just for the example), you would do something like:
var user = PFUser()
var requestActive: String?
override func viewDidLoad() {
super.viewDidLoad()
requestActive = user["requestActive"]
}
Of course, you have to replace String with your actual type.