Order in array of attributes

How can I sort an array with values before presenting them in a repeating structure?

If its a complex array, you can use .sort formatter with the key as param in the REPEAT expression.
Or you can just put sort on the server side query, if that is where the data is coming from.

If its a simple array, you can try just .sort(), but I am not sure if that works.

I’m trying to use “data_detail1.data.attrs.sort($key)” but doesn’t work

What’s $key supposed to be here?
If you are referring to the $key property available inside repeat, that is not available at the time of expression obviously.

You need to put in a column name which is already in the attrs array.
If its a simple array, just using .sort() could work.

Hello

My array of objects from Rest service s:

“atrib_sort”:{“ageny”:“456798”,“bank”:“0001”,“balance”:“10000,00”,“number”:“16376-7”}}

I’m trying to sort with options :

set value attrib_sort = atrib_sort.sort(value)
set value attrib_sort = atrib_sort.sort(name)
set value attrib_sort = atrib_sort.sort()
set value attrib_sort = atrib_sort.sort(’ ')

But, nothing doesn’t working.

Why are you not using the picker UI if you don’t know the code yet?

You have to put the column name in parameter. Something like this:
Atrib.sort(‘agency’)