I need to sort the data in the listview by prioritet

You can get all and extract only that keys:

Thanks, it worked out

https://voda.firebaseio.com/Voda.json?orderBy="Prioritet"&print=pretty

after execution, the data is not sorted, but how the second query for sorting will look like this

https://voda.firebaseio.com/Voda.json?orderBy="Prioritet"&orderBy="$value"&limitToFirst=17&print=pretty

but again, the data is not sorted

Use the list sorting block

https://ai2.appinventor.mit.edu/reference/concepts/pholo.html#sortwithkey



again, the list is not sorted, help me understand

Try this:

The list being sorted has become a list of lists of pairs, judging by the parentheses ().

So the sort key is Lookup in Pairs (item, 'Prioritet'

P.S. I only took one year of Russian in 1970. Don't make me try to use it.

Post the JSON text response here so we can test?

image

Your data requirements are inconsistent, you want to return three different items, these may be sorted in your view in the firebase console, but they probably won't come back that way in your data query response.

Your nodes starting "LNnf..." are at the same level as "nul1" and "nul2"

"ddd" and "first" are different keys

I suggest your normalise your data so that you can easily query it.

this is not my data, it's just from your example
My here

Or like so:

Firebase console:

Rules

image

Blocks

Screen

image

You can if you want filter the returned results using startAt or equalTo...

For example this would return all data with a Priority of 3 or more

image

For example this would return all the data with a Priority of 2

image

Thanks a lot, everything worked out

how to get sorted prices
data.txt (4.5 KB)
This is the data
1



why does the CENA procedure not work



prices are not sorted here

image

image

thanks, everything turned out just one question, how to sort through the TINY elements?

Should be the same approach, if your returned data list is stored in the tinydb

I have such a mistake
error

It's okay, I made mistakes myself.