StructSort
Method Signature
StructSort(struct=[structloose], sortType=[any], sortOrder=[string], path=[string], callback=[function:Comparator])Arguments
Argument
Type
Required
Description
Default
Examples
Numeric sorting
someStruct = {
RED : 93,
YELLOW : 90,
GREEN : 94
};
result = structSort( someStruct, "numeric", "desc" );
writeOutput( lcase( JSONSerialize( result ) ) );
Sort by subelement
Date sorting using callback
Additional Examples
Related
Last updated
Was this helpful?
