# How do I capture the real value?

**URL:** <https://community.postman.com/t/how-do-i-capture-the-real-value/35984>\
**Category:** Help Hub\
**Tags:** tests, variables\
**Created:** [June 6, 2022, 7:21pm UTC](https://community.postman.com/t/how-do-i-capture-the-real-value/35984 "2022-06-06T19:21:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![codythesailpointpost](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@codythesailpointpost](https://community.postman.com/u/codythesailpointpost)\
**Post date:** [June 6, 2022, 7:40pm UTC](https://community.postman.com/t/how-do-i-capture-the-real-value/35984/2 "2022-06-06T19:40:44Z")

</div>

I got it… sorry, just needed to research longer.

Set the test to pm.environment.set(“VARIABLE”, JSON.stringify(pm.response.json()[0].description))

Here is where I found the original answer.

> [@How to escape double quote when setting/using variables?](https://community.postman.com/t/how-to-escape-double-quote-when-setting-using-variables/13505):
>
> I’m making two API calls. The first returns JSON with one of the values being HTML as a string. { "html\_content": "\<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0..." } In the Tests section, I am setting a collection variable with this string. pm.collectionVariables.set("htmlContent", pm.response.json().html\_content) Then, in the second API call, I am trying to POST the HTML string. { "html\_content": "{{htmlContent}}" } However, I’m getting a 400 because Postman is sending the string without …

---

_[View the full topic](https://community.postman.com/t/how-do-i-capture-the-real-value/35984)._
