Firebase Periksa apakah kunci ada 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);
    }
});
florinrelea