$ n="foo"; echo "{}" | jq --arg n "$n" '. += { "$n": $n }'
{
"$n": "foo"
}
My reading of https://jqlang.github.io/jq/manual/#types-and-values suggests that this should work -- but clearly it doesn't. What's going on?
$ n="foo"; echo "{}" | jq --arg n "$n" '. += { "$n": $n }'
{
"$n": "foo"
}
My reading of https://jqlang.github.io/jq/manual/#types-and-values suggests that this should work -- but clearly it doesn't. What's going on?