Application icon

Sort Container Array

The statement is used to sort the array item in a container. The optional key field can contain any of the escape sequences defined in Escape Sequences.

You can specify that the sort should be Ascending, Descending or Randomize.

When sorting Ascending or Descending, each item in the array establishes a sort test value as follows:

When Randomize is selected, the key field is meaningless and is not displayed.

Assuming the following container array in obj and Ascending is specified:

  "genres" : [
    {
      "name" : "rock"
    },
    "blues",
    {
      "name" : "classical"
    }
  ]

executing:

Sort container array 'obj.genres' key 'name'

will result in:

  "genres" : [
    "blues",
    {
      "name" : "classical"
    },
    {
      "name" : "rock"
    }
  ]


Containers

Directed Paths