I have the following:
COMMENT="A random comment"
TEXT_JSON='{"person" : "Jim","comment" : "$COMMENT"}'
echo "$TEXT_JSON" | jq .
This prints
{
"person": "Jim",
"comment": "$COMMENT"
}
which is not what I want. How can I interpolate the string here?
Asked by Jim
(1479 rep)
Jun 5, 2018, 11:16 AM
Last activity: Oct 22, 2024, 09:01 AM
Last activity: Oct 22, 2024, 09:01 AM