I want to make a user query, removing the name of each, and go keeping the names in an array, then display them on a table. The problem is I can not keep them in the settlement, how can I fix it? Thus I make the query to extract the names of users:
var users = [String]()
let ref = Firebase(url:"https:mydatabase/users")
ref.queryOrderedByChild("name").observeEventType(.ChildAdded,
withBlock: { snapshot in
if let username = snapshot.value["name"] as! String {
self.users.append(username)
print("username")
}
})
So I have my users table in firebase
The username var does have the name, but when adding the content of the var the settlement, does not, at the time of execution of the application does not throw any errors.

print(username)(don't use quotes)?