I want to retrieve sites information based on user_id , I am using following query to retrieve site information
ref = Database.database().reference()
self.ref.child("sites").queryOrdered(byChild: "user_id").queryEqual(toValue:"DxMYXkVqnZMC6NEZxdSQF3G2ZJ53")
.observe(.childAdded, with: { snapshot in
if ( snapshot.value is NSNull ) {
print("Not found")
} else {
print("found")
}
})
I am able to call query if its store_name,idToken etc . But not able to call user_id because its inside a childbuAutoid
