Table of contents
  1. 1. Usage Restrictions
  2. 2. Parameters
  3. 3. Result
  4. 4. Samples
list.Sort(list : list, key : string?, reverse: bool?) : list

Sort the entries in a list.

Usage Restrictions

1.9.1 or later

Parameters

Name Type Description
list list The list value.
key string (optional, default:nil) key for value if list contains maps
reverse bool (optional, default:false) sort in reverse order

  

Result

a sorted version of the original list.

Samples

    Output

to sort a list in ascending order:

{{list.sort([25,1,9]) }} 

   

[ 1, 9, 25 ]

   

Tag page
You must login to post a comment.