Skip to content Skip to sidebar Skip to footer

How Do I Retrieve Multiple Items Of Data From Firebase And Merge These Strings Together?

I have a Firebase database which stores data for student timetables. The locations of the multiple items of data are as follows: Module = Timetable > Course > Day > Time &

Solution 1:

I found the way to return the data using snapshot foreach

 firebase.database().ref('events').once('value',(data)=>{
      //console.log(data.toJSON());
      data.forEach(function(snapshot){
        var newPost = snapshot.val();
        console.log("description: " + newPost.description);
        console.log("interest: " + newPost.interest);
        console.log("players: " + newPost.players);
        console.log("uid: " + newPost.uid);
        console.log("when: " + newPost.when);
        console.log("where: " + newPost.where);
      })

      })

Post a Comment for "How Do I Retrieve Multiple Items Of Data From Firebase And Merge These Strings Together?"