How to escape double quote when setting/using variables?

Hey @jagrdude

Welcome to the community!! :star:

This might be what you need:

pm.collectionVariables.set("htmlContent", JSON.stringify(pm.response.json().html_content))

And then use this in the POST body like this:

{
    "html_content": {{htmlContent}}
}
1 Like