# Parsing responseBody with json key having Dots (.)

**URL:** <https://community.postman.com/t/parsing-responsebody-with-json-key-having-dots/8863>\
**Category:** Help Hub\
**Created:** [November 7, 2019, 11:49pm UTC](https://community.postman.com/t/parsing-responsebody-with-json-key-having-dots/8863 "2019-11-07T23:49:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![surajc](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@surajc](https://community.postman.com/u/surajc)\
**Post date:** [November 7, 2019, 11:49pm UTC](https://community.postman.com/t/parsing-responsebody-with-json-key-having-dots/8863/1 "2019-11-07T23:49:37Z")

</div>

Hi,

Sorry if this is already addressed earlier in the forum, I am working on automating some flows and I need to get the values saved in some variables for a few of the keys in the response. My problem though is the keys have Dots in the name: For example, this is a snippet of the response Body, so I am not sure if I need to escape the Dots, since it might confuse with the hierarchy. Is that correct? For example, how do I get the value of versa-tasks.task-status saved in a variable in the below snippet?

“versa-tasks.task”: {  
“fdn”: null,  
“voaeid”: null,  
“moreInfoMessages”: null,  
“endTimeStamp”: 1573116810452,  
“scheduledTimeStamp”: null,  
“versa-tasks.id”: 6,  
“versa-tasks.task-name”: “Deploy”,  
“versa-tasks.object-name”: “Org deploy using workflow”,  
“versa-tasks.domain-name”: “PROVIDER”,  
“versa-tasks.user”: “Administrator”,  
“versa-tasks.task-description”: “Deploy Org Workflow: Demo1”,  
“versa-tasks.task-status”: “COMPLETED”,  
“versa-tasks.percentage-completion”: 100,

Thanks,  
Suraj

---

<div class="post-metadata">

**Author:** ![amit](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/amit/32/2056_2.png) [@amit](https://community.postman.com/u/amit)\
**Post date:** [November 8, 2019, 12:01am UTC](https://community.postman.com/t/parsing-responsebody-with-json-key-having-dots/8863/2 "2019-11-08T00:01:10Z")

</div>

Welcome to the community @surajc 👋

You can use the _square bracket_ syntax to access such properties.

Example:

```
let data = jsonData["versa-tasks.task"]["versa-tasks.task-status"]

```

---

<div class="post-metadata">

**Author:** ![surajc](https://avatars.discourse-cdn.com/v4/letter/s/dc4da7/32.png) [@surajc](https://community.postman.com/u/surajc)\
**Post date:** [November 8, 2019, 12:11am UTC](https://community.postman.com/t/parsing-responsebody-with-json-key-having-dots/8863/3 "2019-11-08T00:11:40Z")

</div>

Great. Thanks a lot @amit. This is what I did:

var jsonData = JSON.parse(responseBody);  
postman.setEnvironmentVariable(“taskStatus”,jsonData[“versa-tasks.task”][“versa-tasks.task-status”])

and that worked!

Thanks!

---

<div class="post-metadata">

**Author:** ![ela.nastika](https://avatars.discourse-cdn.com/v4/letter/e/8dc957/32.png) [@ela.nastika](https://community.postman.com/u/ela.nastika)\
**Post date:** [November 3, 2021, 3:13am UTC](https://community.postman.com/t/parsing-responsebody-with-json-key-having-dots/8863/4 "2021-11-03T03:13:12Z")

</div>

thank you, you saved my day
