Ordenar arreglo
array-sortOrdena un arreglo de valores u objetos por una o más claves (orden estable, natural). Cuándo: hay que transformar, comparar o revisar con exactitud datos estructurados (JSON, CSV, YAML, XML, arreglos). No para: ordenar líneas con intercalación por idioma (lines-sort). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.
EN: Sorts an array of values or objects by one or more keys (stable), ascending or descending, numbers before strings, with locale-aware natural string comparison. When: structured data (JSON, CSV, YAML, XML, arrays) has to be transformed, compared or checked exactly. Not for: sorting lines with locale-aware collation (lines-sort). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Keys to sort by (empty: sort values) (array of string; optional; default []; up to 10 items). | |
| items | Yes | Array (array; required). | |
| order | No | Order (optional; one of: asc, desc; default "asc"). | asc |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | No | any JSON value |