I'm trying to use JQ Transform (https://jqplay.org/) on a JSON object, which I would like to store as string, but it always replaces " with \"
How can I get rid of this \ ?
Input JSON: {"intents":[],"entities":[]}
JQ filter: .|tostring
Output JSON: {\"intents\":[],\"entities\":[]}
I know I would get desired result using Raw Output, but I cannot use it. I can only modify .|tostring filter. Please help.
You can use gsub to filter the string.
Input json:
jq filter:
Output json: