# Accessing object properties inside request body

**URL:** <https://community.postman.com/t/accessing-object-properties-inside-request-body/14660>\
**Category:** Help Hub\
**Tags:** variables, request\
**Created:** [August 2, 2020, 9:23am UTC](https://community.postman.com/t/accessing-object-properties-inside-request-body/14660 "2020-08-02T09:23:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sai.akella](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@sai.akella](https://community.postman.com/u/sai.akella)\
**Post date:** [August 2, 2020, 9:23am UTC](https://community.postman.com/t/accessing-object-properties-inside-request-body/14660/1 "2020-08-02T09:23:42Z")

</div>

**Scenario:**  
I have few objects stored in collection variables. I’m currently not able to access properties of different objects in the request body directly. **Is there a way in postman?**

**Example object:**

> Levels: {
> 
> “Entry”: 1,
> 
> “Core”: 2,
> 
> “Exit”: 3
> 
> }

I would like to access **`Levels.Entry`** in the request body. Currently, I’m doing this way - fetching the respective variable → retrieve the property value → storing the value in a local (or) collection variable and finally access it in the request body.

I feel this is a overhead. It would be nice to access the object’s property in the request body directly - {{Levels.Entry}} or ‘’{{Levels.Entry}}" ( based on the desired data type)

---

<div class="post-metadata">

**Author:** ![allenheltondev](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/allenheltondev/32/31738_2.png) [@allenheltondev](https://community.postman.com/u/allenheltondev)\
**Post date:** [August 3, 2020, 11:47am UTC](https://community.postman.com/t/accessing-object-properties-inside-request-body/14660/2 "2020-08-03T11:47:29Z")

</div>

I don’t believe there is a way to do this natively.

When I’ve had to do something like this in the past, I usually use a pre-request script to pull the value out of the json object and set it to a local variable.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/3/8/38c87ac820c07d34df7afb3c068913f334f226b1.png)

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/3/3/333afd364fb707144cec03655281dcb8e0c9b79a.png)
