I have following structure in firebase:
data/users/<id_user>/lists/<id_list>/children/<child1_id>/children/<child2_id>
how to get this full URL, knowing the only child2_id?
(preferably typescript, angularfire 2)
I have following structure in firebase:
data/users/<id_user>/lists/<id_list>/children/<child1_id>/children/<child2_id>
how to get this full URL, knowing the only child2_id?
(preferably typescript, angularfire 2)
Firebase Realtime Database queries can search the child nodes of a location. But the value you search for must be at a fixed path under each child.
So if you know data/users/<id_user>/lists/<id_list>/children/<child1_id>
, you can query to find the child under that with child2_id
. But you can't search for child2_id
across multiple nested unknown paths.
For more on this, see Firebase Query Double Nested, and possibly (depending on your use-case) Firebase query if child of child contains a value.