0

This days I'm facing a problem with firebase.

I'd like to retrive some values with android, in alphabetical order.

To do this I made a Query in which i use orderBy("ex.Name") and this works fine.

Now i added some data to the nodes, and I'd like to perform the same query but with one more filter.

With the Firebase api you can use only one .OrderBy() and this prevents me to filter data correctly.

So I thought about ordering them alphabetically server side. In this way I will be able to retrive them already ordered and then filtering them on another variabile.

  • The server-side APIs for the Firebase Database are pretty much the same as the client-side APIs. If you want to order on multiple properties, you'll either have to use a 3rd party service or get creative. See my answer here for some example: http://stackoverflow.com/questions/26700924/query-based-on-multiple-where-clauses-in-firebase – Frank van Puffelen Aug 29 '17 at 14:43

1 Answers1

0

You can use orderbychild() method.

https://firebase.google.com/docs/database/admin/retrieve-data

Malavan
  • 789
  • 7
  • 27