vendredi 4 septembre 2020

How to retrieve data from different father nodes in a Firebase Database in JavaScript

I have the following database:

enter image description here

I want to retrieve the value of name given a specific ID value in JavaScript.

Right now I have the following code, but it doesnt seem to acces both ID and name nodes:

var user = db.ref("Users").orderByChild("ID")equalTo("12345");
       
        users.once("value").then(function(snapshot) {
        snapshot.forEach(function(childSnapshot) {

        ...

I apreciate any help you can give me




Aucun commentaire:

Enregistrer un commentaire