get

Function

ArgDescriptionType
itemAny
memberstring
fieldAny
defaultAny

Description

Gets the member field from the item.

This is useful to index an item from an array.

Example

select get(item=[dict(foo=3), 2, 3, 4], member='0.foo') AS Foo from scope()
[
  {
    "Foo": 3
  }
]

Notes

Using the member parameter you can index inside a nested dictionary using dots to separate the layers.

If you need to access a field with dots in its name, you can use the field parameter which simply fetches the named field.

If the item parameter is not specified we use the scope. Basically get(item=scope(), field=fieldname) is same as get(field=fieldname).

See also

  • set: Sets the member field of the item.