0

Image of Database in Console

I have a firebase database and I need to make a query so that I search all of the "groups" for a specific value under "groupIDs", this will then allow me to retrieve the "group key" (eg KaejbPy6EBIGYEyu0S9), What i cant figure out is how to structure my query so that I target "groupIDs"

I am using Android Studio.

Thanks

AL.
  • 36,815
  • 10
  • 142
  • 281
  • If you have an array in your database and find you want to test if it contains a specific *value*, you probably should store the data in a set structure instead. Since your groups look similar to categories, I recommend using the structure I modeled in this answer: http://stackoverflow.com/questions/40656589/firebase-query-if-child-of-child-contains-a-value – Frank van Puffelen Jan 17 '17 at 15:13
  • Hi Frank, that worked perfectly, thanks! – Nisal Jayaneththi Jan 18 '17 at 07:38
  • Good to hear Nisal. I marked your question as a duplicate, since there's little sense in answering it again. :-) – Frank van Puffelen Jan 18 '17 at 16:06

0 Answers0