Array Sort
Sorts arrays of primitives or objects by one or more keys deterministically.
Run tool
Form input
Direct JSON or Markdown
Submit JSON directly or Markdown that can be converted into JSON.
Work steps
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
items | array | Yes | Items |
key | text | Yes | Key |
direction | text | Yes | Direction |
Outputs
| Name | Type | Description |
|---|---|---|
result | array | Result |
work | array | Work |
Sample request
{
"items": [
{
"name": "B",
"score": 2
},
{
"name": "A",
"score": 3
}
],
"key": "name",
"direction": "asc"
}