I have a database that looks like this:

I want to update let's say the second user, the one with uid 5p3XT8TVFbVYNmFt0Kbu1ticaUT2, and change its name to "James". Using the iOS SDK I can do:
let ref = Database.database().reference()
let id = 5p3XT8TVFbVYNmFt0Kbu1ticaUT2
let databaseQuery = ref.child("users").queryOrdered(byChild: "uid").queryEqual(toValue: id)
In order to query the database so it will filter out all users apart from the one I want to change. But this query will now point to a filtered list of users which contains only the user I want to update, not to the user itself. So if I try
databaseQuery.ref.updateChildValues(...)
The database will look like this:
I can't understand from the api reference how to get straight to the queried child. How do I do that?
