0

My firebase DB looks like

enter image description here

Now I want to query the database such that I take all the users whose email id is in a query list.

For example in the above shown database structure, if I want to make a query such that find the users where username in ["allen20252482", "arne19712450"] which can give me two users.

Is it possible?

Currently I can query like https://xyz.firebaseio.com/users.json to get the complete user node data , But is it possible to filter like where I take only those users whose username is in the given query list?

I am using REST API endpoint to query the Firebase DB.

Any suggestion is very much appreciated

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Achy97
  • 994
  • 1
  • 14
  • 29

1 Answers1

0

I suggest reading the documentation on filtering data. It sounds like you want to filter by a child key:

https://xyz.firebaseio.com/users.json?orderBy="username"&equalTo="abcdef"

You will only be able to specify one username at a time.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441