I have the following hierarchy in my Firebase:
func invitedEvents() {
Right,
DataService.ds.REF_USERS.child("eventItem").child("eventOrganized").queryOrdered(byChild: snap.key).queryEqual(toValue: 1).observe(.value, with: { (snapshot) in ("With Snapshot Key:\(snapshot.value)")})
That doesn't work because you're missing a reference to the V9T3cEgEGPRmlkMQb32hxa5gG7L2 node.
If you want all the eventOrganized nodes with a value of 1 under that key then you need to use the following query.
DataService.ds.REF_USERS.child("V9T3cEgEGPRmIkMQb32hxa5gG7L2").child("eventItem").child("eventOrganized").queryOrderedByValue().queryEqual(toValue: 1).observe(.value, with: { (snapshot) in
print("Snapshot Value:\(snapshot.value)")
})
Obviously you don't want to reference V9T3cEgEGPRmlkMQb32hxa5gG7L2 directly, you should store this key in a variable for reusability's sake (maybe you have, I can't tell in your code). I think that's what you wanted.