Function
Arg | Description | Type |
---|---|---|
item | Any | |
member | string | |
field | Any | |
default | Any |
Gets the member field from the item.
This is useful to index an item from an array.
select get(item=[dict(foo=3), 2, 3, 4], member='0.foo') AS Foo from scope()
[
{
"Foo": 3
}
]
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)
.