I am currently facing an issue in my code related to the snapshot
. Specifically, I am trying to retrieve the value of quantity
from my Firebase Database. Here's a snapshot of my database:
https://i.sstatic.net/qN6m4.jpg
and
https://i.sstatic.net/Gw0dv.jpg
firebase.database().ref("mycart/"+uid+"/"+imguid).once("value").then(function(snapshot) {
console.log("uid="+uid);
console.log("imguid="+imguid);
console.log("snapshot.val()="+snapshot.val());
if(snapshot.exists()){
console.log("snapshot"+snapshot.key);
}
console.log("snapshot doest exists");
});