Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 657

pass arguments to jq when inserting key not interpolated

$
0
0

When I run

jq --arg md "blablabla" '. +={'content': "$md"}' blog.json

in blog.json

{"foo": "bar"}

I get

{"foo": "bar","content": "$md"}

The desired output would be:

{"foo": "bar","content": "blablabla"}

Viewing all articles
Browse latest Browse all 657

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>