On this page
article
Jq
Jq
Multiline json string parsed with variables
This overrides label with the bash variable $label
If argjson variable is the same, it’ll panic! Cannot do argjson .label = $label
jq \
--argjson label_var $label \
'.label = $label_var' \
<<< '
{
"label": "string",
"expiration": "2019-08-24T14:15:22Z",
"scopes": [
"string"
]
}
'