How do I get the value of a specific parameter?

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:

“data”: {
“id”: 2,
“email”: “”,
“first_name”: “Janet”,
“last_name”: “Weaver”,
“avatar”: “
“support”: {
“url”: “Reqres - A hosted REST-API ready to respond to your AJAX requests”,
“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

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.

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

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


There are further examples in the Test script examples help documentation: Testing response body

1 Like