1//every user must have an email
2firebase.database().ref(`users/${userId}/email`).once("value", snapshot => {
3 if (snapshot.exists()){
4 console.log("exists!");
5 const email = snapshot.val();
6 }
7});
8
1ref.child("users").orderByChild("ID").equalTo("U1EL5623").once("value",snapshot => {
2 if (snapshot.exists()){
3 const userData = snapshot.val();
4 console.log("exists!", userData);
5 }
6});
7