As previously suggest by me, IMHO, the best way to handle this is to use the power of Firebase queries, and to store your data on Firebase in a Firebase way.
Firstly, stop storing a list in the way you are doing it, and store your list data in an array on firebase. You can do it like this:
Now you see that all your data is accessible for Firebase querying.
You must set an index for the name you wish to query, in your rules, which in this case is "0":
"prueba5": {
"read": true,
"write": true,
".indexOn": "0"
}
Now you can query the data under prueba5 based upon the values in "0", and return the node/key for that value:


