> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Sort List

> Sort numbers, strings, or object properties.

**Sort List** returns a sorted copy of the input. It can compare top-level
values or a nested property selected by an object path.

## Inputs

| Input           | Type   | Required | Description                                   |
| --------------- | ------ | -------- | --------------------------------------------- |
| **List**        | List   | No       | Values to sort. Defaults to `[]`.             |
| **Direction**   | String | Yes      | **Ascending** (default) or **Descending**.    |
| **Object Path** | String | No       | Nested property such as `user.name` or `age`. |

## Output

| Output     | Type | Description                 |
| ---------- | ---- | --------------------------- |
| **Sorted** | List | A sorted copy of the input. |

Numbers are compared numerically and strings use locale-aware text ordering.
When **Object Path** is set, those same rules apply to the value at that path.

<Note>
  Items whose compared values are not both numbers or both strings compare as
  equal, so their relative positions are preserved.
</Note>
