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

jq read inline string, not from stdin

$
0
0

This can read from a file:

jq '.c | fromjson | .id' my_file.json

this reads from stdin:

echo "$my_json" | jq -r '.field'

what if I just want to read from a string like so:

jq '.field'"$my_json"

how to do that?


Viewing all articles
Browse latest Browse all 538

Trending Articles



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