I want to save data from my parse class into strings. I use the following code actually for retrieving data from my parse class.
@IBAction func readAction(sender: UIButton) {
var tagAutor = ""
var tagText = ""
var query = PFQuery(className:"Tags")
query.getObjectInBackgroundWithId("f3AXazT9JO") {
(tag: PFObject?, error: NSError?) -> Void in
if error == nil && tag != nil {
println(tag)
// tagAutor = tag["username"]
// tagText = tag["tagtext"]
} else {
println(error)
}
}
}
In the comments there is what I want to do, in my class called "Tags" there are two cols called "username" and "tagtext" I want to save them in the two string variables "tagAutor" and "tagText". The println(tag) is printing out the following:

How can I save the objects out of my query into this two string variables?
tag.tagTextandtag.username?tagAutor = tag["username"]but there I'm getting an error"Can not assign a value of type 'AnyObject?' to value of type 'String'".String:tagAutor = tag["username"] as! String