I have a data structure like this:
UserOrders
unique-userid-100
unique-orderid-456
[order details here]
unique-orderid-123
[order details here]
unique-userid-200
unique-orderid-789
[order details here]
....
For admin functionalities, I need to query using the orderid (without knowing the userid) and get order details? How can I efficiently do this?
I tried this but I get all the data under UserOrders.
ref.child("UserOrders").queryOrdered(byChild: "unique-orderid-456").observeSingleEvent(...