1

I have a firebase data structure set up the following way

volunteers
 -Ka3oeRZ-RhhJ-Iw5CmE
    address: '17 McGovern Lane',
    email: 'sure@gmail.com'
 -Ka3oeRZ-RhhJ-Dkxc43
    address: '9 Palace Drive',
    email: 'wonton@gmail.com'
 -Ka3oeRZ-RhhJ-Acda2
    address: '10 Happy Lane',
    email: 'happy@gmail.com'

Is there a way to query all of these to check for a particular email? I'm trying to figure out the different options but kind of confused by what to order by.

Yu Mad
  • 828
  • 2
  • 12
  • 29
  • 1
    This answer should help you out: http://stackoverflow.com/questions/14963776/get-users-by-name-property-using-firebase?rq=1 – imjared Jan 09 '17 at 20:38

1 Answers1

3

You can use Firebase Queries:

var query = firebase.database().ref().child('volunteers').orderByChild('email').equalTo(email); // the var email is the email you're looking for