I'm manipulating a response from an external service. The JSON response includes escaped quotation marks on the field names \"fareBasis\":\"EH00ACSW\". My script makes some changes to the JSON and sends it back but it is now
Copy code
fareBasis: "EH00ACSW"
It gets rejected. Is there a shortcut to getting my 110 field names into inverted commas?
n
NElliott
12/01/2021, 8:52 AM
I think using JSON.stringify() will achieve what you want as long as you don't mind it being a string instead of an object afterwards...