JQ task definition object
JQ task (identified by "type": "JQ"
) is used to process JSON data that is supplied to the task, by using the popular JQ processing tool’s query expression language. For complete JQ documentation, refer to the JQ Manual.
Here is an example of a JQ task:
"JQ Filter": {
"credentials": "CredentialsId",
"description": "Transform task input JSON parameters using JQ",
"type": "JQ",
"inputParameters": {
"key1": {
"value1": ["a", "b"]
},
"key2": {
"value2": ["c", "d"]
}
},
"filter": "{ key3: (.key1.value1 + .key2.value2) }",
"end": true
}
The execution of this example task above will provide the following output:
{
"result": {
"key3": ["a", "b", "c", "d"]
},
"resultList": [
{
"key3": ["a", "b", "c", "d"]
}
]
}
The JQ task has following additional fields:
Field |
Type |
Required |
Description |
---|---|---|---|
|
String |
Yes |
The JQ query expression. For complete JQ documentation, refer to the JQ Manual. |
The result for the JQ task is a JSON Object with the following fields:
Field |
Type |
Description |
---|---|---|
|
JSON Object |
The first results returned by the JQ expression. |
|
Array[JSON Object] |
A List of results returned by the JQ expression. |