Sorts a struct according to the specified arguments and returns an array of struct keys
StructSort(struct=[structloose], sortType=[any], sortOrder=[string], path=[string], callback=[function:Comparator])
Argument | Type | Required | Description | Default |
---|---|---|---|---|
struct |
struct |
true |
The struct to sort | |
sortType |
any |
false |
An optional sort type to apply to that type - if a callback is given in this position it will be used as that argument | text |
sortOrder |
string |
false |
The sort order applicable to the sortType argument | asc |
path |
string |
false |
||
callback |
function:Comparator |
false |
An optional callback to use as the sorting function. You can alternatively pass a Java Comparator. |
- StructAppend
- StructClear
- StructCopy
- StructDelete
- StructEach
- StructEquals
- StructEvery
- StructFilter
- StructFind
- StructFindKey
- StructFindValue
- StructGet
- StructGetMetadata
- StructInsert
- StructIsCaseSensitive
- StructIsOrdered
- StructKeyArray
- StructKeyExists
- StructKeyList
- StructKeyTranslate
- StructMap
- StructNew
- StructReduce
- StructSome
- StructToQueryString
- StructToSorted
- StructUpdate
- StructValueArray