# Postman- Retrieve specific key values from JSON object

**URL:** <https://community.postman.com/t/postman-retrieve-specific-key-values-from-json-object/48089>\
**Category:** Help Hub\
**Tags:** json-response\
**Created:** [June 2, 2023, 9:19am UTC](https://community.postman.com/t/postman-retrieve-specific-key-values-from-json-object/48089 "2023-06-02T09:19:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![devang-ey](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@devang-ey](https://community.postman.com/u/devang-ey)\
**Post date:** [June 2, 2023, 9:19am UTC](https://community.postman.com/t/postman-retrieve-specific-key-values-from-json-object/48089/1 "2023-06-02T09:19:43Z")

</div>

How to get the specific key values in the form of an Array or List.

e.g.

```auto
{
    "description": "demo",
    "status": "test",
    "name": "mytest",
    "members": [
        {
            "UserId": "886af1af66",
            "Name": "u1",
            "email": "user1@test.com"
        },
        {
            "UserId": "0aa280686",
            "Name": "u2",
            "email": "user2@test.com"
        },
        {
            "UserId": "0dc888888",
            "Name": "u3",
            "email": "user3@test.com"
        }
    ]
}

```

**Expected outcome:** [‘user1@test.com’,‘user2@test.com’,‘user3@test.com’]

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [June 2, 2023, 10:17am UTC](https://community.postman.com/t/postman-retrieve-specific-key-values-from-json-object/48089/2 "2023-06-02T10:17:33Z")

</div>

Postman uses JavaScript under the hood, so this is more of a JavaScript query.

This can be achieved using the JavaScript map function.

[JavaScript Array map() Method (w3schools.com)](https://www.w3schools.com/jsref/jsref_map.asp)

```auto
const response = pm.response.json();
let emails = response.members.map(members => members.email);
console.log(emails);

```

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