JSON functions
json
Convert an object to json
Convert an object to is JSON representation
Example, if the current context is:
json
{
"outputs": {
"task1": {
"value": 1,
"text": "awesome1"
},
"task2": {
"value": 2,
"text": "awesome2"
}
}
}
the output of {{ json outputs.task2}}
will be {"value":2,"text":"awesome2"}
.
jq
Transform vars with JQ
Apply the JQ expression to a variables.
first
mean to always fetch the first element, by default jq return an array of results
Internally, Jackson JQ is used and support only a large subset of official JQ.
Example, if the current context is:
json
{
"outputs": {
"task1": {
"value": 1,
"text": "awesome1"
},
"task2": {
"value": 2,
"text": "awesome2"
}
}
}
the output will be 1
.