title: Invalid JSON is being generated in Postman
body: <p>I’m trying to compose a request based on a response. I have the following pre-request script:</p>
  <pre><code>// Get the response.
  var stageResponse = pm.variables.get(&quot;getResponse&quot;);
  // Update some data.
  entity = stageResponse.user.entities[0];
  entity.value = &quot;married&quot;;
  // Setup the request.
  var requestString = JSON.stringify(stageResponse);
  // !!!console.log(requestString) logs the object in the correct json syntax.
  pm.environment.set('requestBody', requestString);
  </code></pre>
  <p>And in the body, I have: {{requestBody}}</p>
  <p>The problem is that the response has the following element:</p>
  <pre><code>{
  &quot;id&quot;: &quot;123&quot;,
  &quot;description&quot;: &quot;Why won't your spouse be a co-signer?&quot;,
  }
  But looking at the code after making the call, I see:
  
  {
  &quot;id&quot;:&quot;123&quot;,
  &quot;description&quot;:&quot;Why won'\''t your spouse be a co-signer?&quot;
  }
  </code></pre>
  <p>which is not valid JSON. I cannot do any string manipulation since the pre-request value looks OK.</p>
  <p>I’m running version 8.0.7</p>
  <p>You can try a simple test using the following:</p>
  <p><a href="https://i.stack.imgur.com/9HKHJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9HKHJ.png" alt="enter image description here" /></a></p>