Sort Array List — Reference
Sort the list in place by its values or one item property.
Sort the list in place by its values or one item property.
Before you begin
Section titled “Before you begin”- A Server Connect action. Create the referenced Array List earlier in the same request before using it.
Sort Array List
Section titled “Sort Array List”Sort the list in place by its values or one item property.
Settings
Section titled “Settings”| Setting | Meaning |
|---|---|
| Array List | Choose a Create Array List step available above this action. The stored reference is its name; it is not a database connection or a client-side component. |
| Property | Optional item property to sort by, for example price. Leave it empty when sorting primitive values. |
| Descending | Reverses the comparison direction. Default off, giving ascending order. For numeric prices, enable it to place the largest first. |
Worked example
Section titled “Worked example”Create products with [{“name”:“Pencil”,“price”:2},{“name”:“Backpack”,“price”:49.95}]. Select Property price and enable Descending. Read the list afterward and confirm Backpack appears first.
Check the behavior
Section titled “Check the behavior”Omit Property for a list of primitive values. Use comparable values of consistent types, and ensure all records contain the chosen property. Sorting mutates the list; it does not return a separately sorted output or guarantee a locale-aware ordering.
Return to the action workflow
Section titled “Return to the action workflow”Use a Get Array List Value step when you need to expose the final list after mutations. Use a database or server session when the data must persist beyond this request.
Check your result
Section titled “Check your result”You can configure this operation and verify the example’s resulting value or list.