How do you get a password value associated with a username tag in firebase?

i can not understand why my code can not find the password in the list even though it is clearly in there.

here is my database:
image

here is my code:

here is the output:

the only thing i could think of in solving this is to use the replace block and remove everything else except the one i am looking for, but that's too tedious.

or i can also just store the entries without the "/NewPassword" label and save it as a list and retrieve it easily that way, but i really want "this way" of storing data to work coz it looks neat and it prevents double entries.

so how do i get this way of coding to get the value that i need?

i was able to solve this by doing this code:

i was really wondering if this is the only way to do this? i was hoping for a more simpler solution than using the replace block. thank you in advance to anyone who could answer

Perhaps try something like this:

image

1 Like

omg!! thank you!! btw, i am a big fan sir. i learned this way of storing values to the database by coming across your replies in this forum. thanks again!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.