Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

firebase check if key exists javascript

// Firebase Realtime Database
ref.child("users").orderByChild("ID").equalTo("U1EL5623").once("value",snapshot => {
    if (snapshot.exists()){
      const userData = snapshot.val();
      console.log("exists!", userData);
    }
});
 
PREVIOUS NEXT
Tagged: #firebase #check #key #exists #javascript
ADD COMMENT
Topic
Name
6+1 =