function getUsersEmail() {
const dbRef = ref(getDatabase());
get(child(dbRef, `users/` )).then((snapshot) => {
if (snapshot.exists()) {
console.table(snapshot.val());
} else {
console.log("No data available");
}
}).catch((error) => {
console.error(error);
});
}
I was able to output the database to the console. I would like to output only the email addresses of users.
JSON File
{
"users": {
"2Le5WxOGnWWrkshsEqjeSIq527O2": {
"email": "q5@gmail.com",
"password": "qweqwe"
},
"2jn1YmI9twce3ylEP8wiu5QhUDf1": {
"email": "55@gmail.com",
"password": "qweqwe"
},