Returns a sorted array of the top level keys in a structure.
Sorts using alphabetic or numeric sorting, and can sort based
on the values of any structure element.
Lucee Object Methods Reference
Object Method Struct.sort
Struct.sort([string sortType,[string sortOrder,[string pathToSubElement]]]):array
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Description |
---|---|---|---|
sortType | string | No |
define one of the following: |
sortOrder | string | No |
sort direction: _- asc (default): ascending (a to z) sort order |
pathToSubElement | string | No | String or a variable that contains one |