I have a Firebase table called Users
where I store user objects of form
"users": {
"user1": {
"name": "username",
"id": "userID",
},
}
How can I create a proper query to get all users with 'name'.
I tried this, but this returns a null snapshot:
let ref = self.getDatabaseInstanceWith(child: FirebaseIdentifiers.tableUsers)
ref.queryOrdered(byChild: "name")
.queryEqual(toValue: "username")
.observe(.value, with: { snapshot in
}