Sorts an array. ascending and descending sort the items (by the sort_by keys, per key overridable, empty sorts the items themselves) and reverse flips the order of the items, ignoring sort_by.
Updated
Parameters
Name
Type
Required
Description
order
one of: ascending, descending, reverse
yes
Request body
Name
Type
Required
Description
items
array of any
yes
The array
sort_by
array of SortKey
no
What to sort by, main key first. Empty sorts the items themselves
order
one of: asc, desc
no
Order for keys that do not set their own: asc or desc (default "asc")
Example request
A request body that works, as JSON.
{"items":["Zoe","Ana","Ben"],"order":"asc"}
Response
The fields inside data of a successful response.
Name
Type
Required
Description
items
array of any
yes
The sorted items
count
integer
yes
Number of items
Example response
A real answer from the operation, as JSON. The fields in the table above are inside data.