Skip to main content

List Sort

Runs on: Shared (backend or chatbox overlay).

Sorts a list. The original list is not modified.

Strings, numbers and booleans sort by value. Lists of custom or built-in objects sort by a Sort By field, or wire the field input to choose it at runtime. Numbers sort numerically, text alphabetically (case-insensitive, natural order, so item2 comes before item10), and booleans put false before true.

Order labels follow the type: A → Z / Z → A for text, Low → High / High → Low for numbers, False First / True First for booleans, Ascending / Descending otherwise.

Inputs​

NameTypeDescription
listlistThe list to sort.
fieldstringWire this to choose the sort field at runtime instead of in the node.

Outputs​

NameTypeDescription
resultlistThe sorted list, with the same item type as the input.

Configuration​

  • Order: Ascending or descending.
  • Sort By: Required for lists of custom or built-in objects. With no field selected, an object list passes through unsorted.

Example​

Sort a leaderboard by score (High → Low), then feed it into List Take (first 5) for a !top command. For a tie-break, chain a second List Sort on that field. The sort is stable, so ties keep their order from the first sort.