FlowmageDocs

Sort

Orders rows by the fields you choose, with numbers and dates in real order.

Settings

SettingWhat it is
RowsThe list to order.
Sort byThe first field decides; a second field breaks its ties. Rows with no value sort last. No fields keeps the incoming order.
Technical details
KeyValue
rowsany JSONits `{{ }}` must give an array
sortlist of {field: text, direction?: "asc" or "desc"}, by default []

Output

FieldType
rowsarray
countRow countnumber
Sample output, and the expression for each field
  • count1
  • rows
    • [0]
      • id"INV-003"

Errors

When a step of this node stops a run, the run page shows a code. Look it up:

Example step

The step as a flow file holds it. Replace each value in <…>.

{
  "config": {
    "rows": "<rows>",
    "sort": []
  },
  "label": "Sort",
  "type": "list.sort",
  "version": 1
}