SortBy
This formula allows you to sort an array (list) of values.
Returns
array<T>
JSON Format
{
"type": "sortBy",
"components": ...,
"sort_by_selector": ...,
"order": ...,
"sort_by_value_key": ...
}
RPG Script
This component can be written in RPG Script as:
sortBy(...)
Fields
| Field | Type | Required | Description |
|---|---|---|---|
sort_by_value_key | String | Optional parameter that lets you provide a key to use in the sort_by_selector formula to access the array's current value in the iteration. e.g: if you are iterating classes, you might want to assign "$class" to the sort_by_value_key, to make your system easier to read. This is also helpful when dealing with nested SortBy formulas, as it will allow inner SortBy formulas to access the values of outer filter formulas. |