Single quotes do not expand the $variables
inside them.
Try
'{"item":"'"$SOMETHING"'"}'
instead. Brief explanation:
'{"item":"'
is a string delimited by single quotes that contains double quotes
"$SOMETHING"
is a string delimited by double quotes, that expands the variable $SOMETHING
'"}'
is again a ''
-delimited string that contains double quotes
- Simply writing those strings in a row without gaps is string concatenation
In this way, you get your variable expansion, but don't have to insert any backslashes to escape the double quotes.