tablesort

.tablesort column:{Int}
order:{TableSortOrder = TableSortOrder.ASCENDING}
table:{MarkdownContent}
-> Node

Sorts a table based on the values of a column.

Example:

.tablesort {2}
| Name | Age | City |
|------|-----|------|
| John | 25 | NY |
| Lisa | 32 | LA |
| Mike | 19 | CHI |

Result:

| Name | Age | City |
|------|-----|------|
| Mike | 19 | CHI |
| John | 25 | NY |
| Lisa | 32 | LA |

Return

the sorted table

Parameters

column

index of the column (starting from 1)

order

sorting order (ascending or descending)

Values

table

table to sort