$processor$: get-data
$processor$: get-data
get-data
processor is used to get data from “data”.-- string foo: $processor$: get-data
Assuming
foo: "hello"
is part of “data”, the variable foo
will be get “hello” as the value.KeyBy default, the name of the variable or list where the data is being store is used as the key. You can overwrite the key using key
attribute:
Key
By default, the name of the variable or list where the data is being store is used as the key. You can overwrite the key using
key
attribute:-- string foo: $processor$: get-data key: some-other-key-instead-of-foo
Default ValueIf the data is not found, we use the body as default value if body is available.
Default Value
If the data is not found, we use the body as default value if body is available.
-- string foo: $processor$: get-data "hello world"
The body must be valid json, compatible with the data type on which we are using the
get-data
processor.Default Value in Caption For Basic TypesFor basic types like integer
, boolean
etc, the default value can also be provided in the caption. E.g.
Default Value in Caption For Basic Types
For basic types like
integer
, boolean
etc, the default value can also be provided in the caption. E.g.-- string foo: hello world $processor$: get-data
Providing both
body
and caption
when using get-data
is an error.