I'm a Firebase newbie and I would like to figure out how to access deep nested data in Realtime Database. Let's suppose I have the following structure:
I would like to get the block of data in which location -> Id value corresponds to 3154380, (in this case is the second one)
How could achieve this ?
Just put the sub-path in .orderByChild and use .equalTo:
database().ref('reports').orderByChild('location/id').equalTo('3174380');
However, I will say, you should really look at flattening your data structure for best performance and usability in this environment.