Skip to main content
Skip table of contents

Sort

This placeholder allows you to sort maps and lists in Velocity.

Methods

NameTypeDescription
$sort.asc(unsortedList)List<String>

Returns the list in ascending order.

ParameterTypeDescription
unsortedListList<String>The list which needs to be sorted.
$sort.asc(unsortedMap)Map<String,String>

Returns the map in ascending order by key.

ParameterTypeDescription
unsortedMapMap<String,String>The map which needs to be sorted.
$sort.ascByValue(unsortedMap)Map<String,String>

Returns the map in ascending order by value.

ParameterTypeDescription
unsortedMapMap<String,String>The map which needs to be sorted.
$sort.desc(unsortedList)List<String>

Returns the list in descending order.

ParameterTypeDescription
unsortedListList<String>The list which needs to be sorted.
$sort.desc(unsortedMap)Map<String,String>

Returns the map in descending order by key.

ParameterTypeDescription
unsortedMapMap<String,String>The map which needs to be sorted.
$sort.descByValue(unsortedMap)Map<String,String>

Returns the map in descending order by value.

ParameterTypeDescription
unsortedMapMap<String,String>The map which needs to be sorted.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.