I am trying to query data in a Firebase database using:
queryEqual(toValue: Any?, childKey: String?)
My database structure:
Schools {
testUID1 {
schoolNameLC: test school 1
}
}
My request:
databaseReference.child("Schools").queryEqual(toValue: "test school 1", childKey: "schoolNameLC").observe(.value) { (snap) in
print(snap)
}
This query prints null, and I cannot get it to work. Due to how my application is configured, I do not know that the key schoolNameLCmatters testSchool1under the parent key testUID1. All I want to do is search through Schoolsmy database and return something with a schoolNameLCvalue test school 1.
source
share