I’m having issues with a string conversion.
I have a Step that returns this JSON
{
"$success": true,
"stderr": "",
"stdout": “[{\”name\”:\”Alice\”,\”age\”:\”30\”},{\”name\”:\”Bob\”,\”age\”:\”25\”}]"
}
I need to use that JSON inside a string with double quotes, but no matter what I do I cannot get the escape to double escape inside the second string.
I’ve tried using the String Replace, the Advanced Regex, and even trying to modify the the original output to include this, but every time I still get this
{
"count": 100,
"query": "| makeresults format=json data=\"[{\”name\”:\”Alice\”,\”age\”:\”30\”},{\”name\”:\”Bob\”,\”age\”:\”25\”}]\"\n| table name,age\n| outputlookup temp_data append=false create_empty=true override_if_empty=false",
"search_timeframe": ""
}
The data string is not escaping the inner double quotes causing the query to terminate early and error.
Any suggestions on how I can format that inner string to double escape the quotes?