M
M
Morerion2018-08-13 14:05:29
JavaScript
Morerion, 2018-08-13 14:05:29

Firebase search?

I have many users in the Users/ branch, I need to find one of them by user_email and, for example, change the status.
cIKO0pliAR4.jpg
Here is my code but it doesn't work for some reason...

firebase.database().ref('Users').orderByChild('user_email').equalTo(email).once('value').then(function(snapshot) {
    var key = snapshot.val()
    alert(key);
 })

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question