Skip to main content

I am trying to construct json for an api call but using javascript, but when I try the following I am getting single quotes which is failing. How do I get double quotes from json.parse

 

const obj1 = JSON.stringify(myObj);

{"shipment":{"service_code":"fedex_priority_overnight"}

 

const obj = JSON.parse(obj1)

shipment: { service_code: 'fedex_priority_overnight'}

Hi ​@GDHANRAJ 

For us to have full context, post screenshots showing how your Zap step is configured in EDIT mode with the field mappings visible.

 

TIPS:


@GDHANRAJ 

JSON.parse is used to convert existing JSON in a javascript object, If you want to send JSON then you should use JSON.stringify, this will convert the javascript object into JSON form.


Reply