JQ is an open-source, command line processor that can be used to manipulate, analyze, and transform JSON data. Within Alloy, raw JSON data is ingested when receiving incoming API requests, as well as when processing raw responses that come from data service integrations. In some cases, you can apply JQ for formatting or deriving a specific value for use in a workflow.
In a workflow, JQ can be used for Input and Output Attributes. To use, check “Parse with JQ”.
Click the underlined “JQ” portion to access the JQ manual. Like any language, there are some familiarities. In this manual, you can find guided examples and helpful callouts.
You can use JQ Play to test before implementing it in your workflow.
Example:
Suppose your JSON looks like this:
{
"value": "10"
}
To convert the above 10 from a string to a number, you can use the following jq:
.value | tonumber
Comments
0 comments
Please sign in to leave a comment.