# How do I get the value of a specific parameter?

**URL:** <https://community.postman.com/t/how-do-i-get-the-value-of-a-specific-parameter/24432>\
**Category:** Help Hub\
**Created:** [June 2, 2021, 6:43pm UTC](https://community.postman.com/t/how-do-i-get-the-value-of-a-specific-parameter/24432 "2021-06-02T18:43:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![docking-module-physi](https://avatars.discourse-cdn.com/v4/letter/d/c6cbf5/32.png) [@docking-module-physi](https://community.postman.com/u/docking-module-physi)\
**Post date:** [June 2, 2021, 6:43pm UTC](https://community.postman.com/t/how-do-i-get-the-value-of-a-specific-parameter/24432/1 "2021-06-02T18:43:55Z")

</div>

Maybe I’m too stupid, but after 2 days of searching, I still haven’t found an answer.  
I was given the task, I need to get the parameter value from json, for example:  
[https://reqres.in/api/users/2](https://reqres.in/api/users/2)

{  
“data”: {  
“id”: 2,  
“email”: “janet.weaver@reqres.in”,  
“first\_name”: “Janet”,  
“last\_name”: “Weaver”,  
“avatar”: “[https://reqres.in/img/faces/2-image.jpg](https://reqres.in/img/faces/2-image.jpg)”  
},  
“support”: {  
“url”: “[Reqres - A hosted REST-API ready to respond to your AJAX requests](https://reqres.in/#support-heading)”,  
“text”: “To keep ReqRes free, contributions towards server costs are appreciated!”  
}  
}

And I only need to get the value of the id and email parameter, how can I do this with postman

---

<div class="post-metadata">

**Author:** ![neilstudd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/neilstudd/32/8213_2.png) [@neilstudd](https://community.postman.com/u/neilstudd)\
**Post date:** [June 2, 2021, 6:55pm UTC](https://community.postman.com/t/how-do-i-get-the-value-of-a-specific-parameter/24432/2 "2021-06-02T18:55:33Z")

</div>

Hi @docking-module-physi,

Here is an example code which you can enter in the **Tests** tab of the request. This will load the specified values from the response.

```auto
var jsonData = pm.response.json();
console.log("The ID is " + jsonData.data.id);
console.log("The email is " + jsonData.data.email);

```

If you look in Postman’s **Console** tab, you will see the values have been extracted:

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

There are further examples in the _Test script examples_ help documentation: [Testing response body](https://learning.postman.com/docs/writing-scripts/script-references/test-examples/#testing-response-body)
