Getting data from a node that does not know the reference

Asked

Viewed 17 times

1

Hello, if anyone can help me thank you.

To get data from a given node in Firebase we specify the node the code will use for reference, for example:

The reference will be: "food/fruit"

With this I can use the methods to get the "fruit" value itself or the children of this node that could be "orange" using the Child or even the child of "orange", which can be "sour orange" using the Children method. So far everything ok. but and when we store the data in a node that was inserted using push()? with this method the generated node will have a random name so how can I insert this random value within .chil("nome aleatório gerado e que desconheço")?

1 answer

0

I couldn’t solve it the way I wanted but I solved it using the randomly generated UUID and putting the generated value as id of what I want to store instead of using put to generate a random uuid within firbase.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.