How can i call all the users from a DB that meet a condition?

Hi there,

Im trying to make a filter, to see all the users that has a certain caracteristics or searching criterias of the app user. For example, if the user want another user of the app (registered on Firebase DB) that have a dog, i want to show that user on the active screen.

If using firebase, set .indexOn in your rules for the tag "pet" ("has dog")

https://firebase.google.com/docs/database/security/indexing-data

Alternatively, call back all the data and use dictionary blocks

I want to do the consulting process directly on the blocks, is that possible ?

On the image are the searching criterias that i want to filter, so, if the user check 2 of them, the next Screen will show the user that meet the criteria.

On the second image, the DB on Firebase show the options of the users, so I want to do the consulting on this page to show the result on MIT.

Yes, you can build a query using your blocks.

You will at some point need to send that query to firebase to return the results. This will require the indexing of all the tags in your database you want to filter.

Unless, as I previously indicated, you "wastefully" call back all the data in your database as a json, and use dictionaries to conduct the filtering

another page from the documentation:
https://firebase.google.com/docs/database/rest/retrieve-data

Thank's you, I will try that.

Do you have some example of the blocks building?

You can only filter firebase realtime database on one key at a time, but it may be possible to run a second query against the results of the first query (not tried it but it can be done with cURL). Otherwise, conduct subsequent queries using dictionaries in the app.