I\'m new to firebase and I have such structure of my firebase project
I want to get all objects, that \"Interested\" value is equal to \"men\"
I wr
you need to loop through all the key-value profiles
if let allProfiles = snapshot.value as? [String:AnyObject] {
for (_,profile) in allProfiles {
print(profile);
let userInterest = profile["Interest"]
}
}
Here _ is the key that is in the format KYXA-random string
and profile will be the element for that key.
Edit:
There is querying for child values as per the docs.
Try thisUserRef.queryOrderedByChild("Interest").equalTo("men")
and then using the inner loop that i specified in the answer