I would like to get the data of name, phone number, foodName and quantity and show it in my HTML table. But I have no idea how to get it since I'm a beginner.
var rootRef = firebase.database().ref().child("Requests");
rootRef.on("child_added", snap => {
var name = snap.child("name").val();
var phone = snap.child("phonenumber").val();
var foodname = snap.child("foodName").val();
var quantity = snap.child("quantity").val();
}
I expect I will able to get the data of name, phonenumber, foodName and quantity and display to my HTML table.
Aucun commentaire:
Enregistrer un commentaire