This can read from a file:
jq '.c | fromjson | .id' my_file.jsonthis 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?
This can read from a file:
jq '.c | fromjson | .id' my_file.jsonthis 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?