Skip to main content
Skip table of contents

Sort

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

Methods

Name

Type

Description

$sort.asc(unsortedList)

List<String>

Returns the list in ascending order.

  • Parameter: unsortedList

  • Type: List<String>

  • Description: The list which needs to be sorted.

$sort.asc(unsortedMap)

Map<String,String>

Returns the map in ascending order by key.

  • Parameter: unsortedMap

  • Type: Map<String,String>

  • Description: The map which needs to be sorted.

$sort.ascByValue(unsortedMap)

Map<String,String>

Returns the map in ascending order by value.

  • Parameter: unsortedMap

  • Type: Map<String,String>

  • Description: The map which needs to be sorted.

$sort.desc(unsortedList)

List<String>

Returns the list in descending order.

  • Parameter: unsortedList

  • Type: List<String>

  • Description: The list which needs to be sorted.

$sort.desc(unsortedMap)

Map<String,String>

Returns the map in descending order by key.

  • Parameter: unsortedMap

  • Type: Map<String,String>

  • Description: The map which needs to be sorted.

$sort.descByValue(unsortedMap)

Map<String,String>

Returns the map in descending order by value.

  • Parameter: unsortedMap

  • Type: Map<String,String>

  • Description: 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.