I need to queryOrderedByValue()
on a node whose key is auto-generated. My database is structured as per pic below (/users-pings/$uid/$uid/"auto-id").
What changes can I make to my query below to achieve this?
REF_USERS_PINGS.child(currentUid).child(forId).queryOrderedByValue().queryEqual(toValue: "true").observeSingleEvent(of: .value) { (snapshot) in
if snapshot.exists(){
handler(true)
} else {
handler(false)
}