I have the following data structure:
items:
id1 - dynamically set, unknown
id2 - dynamically set, known
item: data
I want to get all data inside id2
.
Using firebase.database().ref('items').orderByChild('item').equalTo('data')
I get null but at the same time it's no problem to access all data inside id1
though. Apparently using this method it's impossible to access data with 2 and more levels of depth.
Firebase declares they support up to 32 levels of nesting. So there should be some methods for advanced searching data anyways.
How can one access an object with known property and known value while searching at 2 or more levels of depth with arbitrary keys?