Answers for "firebase database check if value exists"

1

firebase database check if value exists

var ref = firebase.database().ref("users/ada");
ref.once("value")
  .then(function(snapshot) {
    var a = snapshot.exists();  // true
    var b = snapshot.child("name").exists(); // true
    var c = snapshot.child("name/first").exists(); // true
    var d = snapshot.child("name/middle").exists(); // false
  });
Posted by: Guest on April-08-2021

Code answers related to "firebase database check if value exists"

Code answers related to "Javascript"

Browse Popular Code Answers by Language