Text Area shows "Array" on adding the json data

i am running into another issue, when i use the json with escape character, it is stripping the "\", my expectation is WYSIWYG

Example, i am putting this in text area

{ \"reportRequests\": [ { \"viewId\": \"1234567\", \"dateRanges\": [ {\"endDate\": \"yesterday\", \"startDate\": \"yesterday\"} ], \"metrics\": [ {\"expression\": \"ga:users\"}, {\"expression\": \"ga:sessions\"}], \"dimensions\": [ {\"name\": \"ga:userType\"}, {\"name\": \"ga:campaign\"} ], \"pageToken\": \"1\", \"pageSize\": \"100000\", \"samplingLevel\": \"LARGE\" } ] }

and i get this

{ "reportRequests": [ { "viewId": "1234567", "dateRanges": [ {"endDate": "yesterday", "startDate": "yesterday"} ], "metrics": [ {"expression": "ga:users"}, {"expression": "ga:sessions"}], "dimensions": [ {"name": "ga:userType"}, {"name": "ga:campaign"} ], "pageToken": "1", "pageSize": "100000", "samplingLevel": "LARGE" } ] }

Expectation is WYSIWYG, i have tried with WYSIWYG ON as well.
 
okay, i have fixed this by post processing

$searchVal = """ ;
$replaceVal = "\"" ;

str_replace ( $searchVal, $replaceVal, $subjectVal)
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top