CodableAIA Stacksona Company

Array Sort

Sorts arrays of primitives or objects by one or more keys deterministically.

Run tool

Form input

Output JSON


          

Work steps

    Inputs

    NameTypeRequiredDescription
    itemsarrayYesItems
    keytextYesKey
    directiontextYesDirection

    Outputs

    NameTypeDescription
    resultarrayResult
    workarrayWork

    Sample request

    {
      "items": [
        {
          "name": "B",
          "score": 2
        },
        {
          "name": "A",
          "score": 3
        }
      ],
      "key": "name",
      "direction": "asc"
    }