# How To Refer to JSON Properties of Collection Variable within a Request Body

**URL:** <https://community.postman.com/t/how-to-refer-to-json-properties-of-collection-variable-within-a-request-body/15154>\
**Category:** Help Hub\
**Tags:** variables, json\
**Created:** [August 19, 2020, 5:07pm UTC](https://community.postman.com/t/how-to-refer-to-json-properties-of-collection-variable-within-a-request-body/15154 "2020-08-19T17:07:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MedievalNerd](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@MedievalNerd](https://community.postman.com/u/MedievalNerd)\
**Post date:** [August 19, 2020, 5:07pm UTC](https://community.postman.com/t/how-to-refer-to-json-properties-of-collection-variable-within-a-request-body/15154/1 "2020-08-19T17:07:43Z")

</div>

Hi there!

In order to save on the number of variables saved in my Collection, we thought of saving them as a JSON within a collection variable.

Simplified example,

I have “configTest” which is a collection variable defined as:

```
{
id: 0,
key: "UniqueKey",
}

```

I want to use the value of the key property within the body of a request.

Obviously things like {{configTest.key}} don’t work. Is my only option to extract the value of the key property, and save it within a temporary collectionVariable?

Or is there a way to point directly towards that value within the JSON of the collection variable without having to pass it on to this temporary collection variable I’m considering of using. (Seems like my only option)

Any feedback/tips would be welcomed!

Thanks!

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [August 27, 2020, 1:42pm UTC](https://community.postman.com/t/how-to-refer-to-json-properties-of-collection-variable-within-a-request-body/15154/2 "2020-08-27T13:42:48Z")

</div>

You can’t use nested properties using the {{someVar}} syntax.  
You need to transform them in other Postman variables in the pre-request script before using them.
