Skip to content

get

get(object, path) → any · Object

Gets a value from an object or array by key or index.

  • object (required): object or array

  • path (required): key name (string) or index (number)

bash
echo '{"items": ["a", "b", "c"]}' | utlx -e 'get($input.items, 1)'
# "b"
utlx
{
  second: get($input.items, 1),
  name: get($input, "name")
}

Released under AGPL-3.0.