# How to parse Json Array of object

**URL:** <https://community.postman.com/t/how-to-parse-json-array-of-object/30691>\
**Category:** Help Hub\
**Created:** [December 14, 2021, 12:41pm UTC](https://community.postman.com/t/how-to-parse-json-array-of-object/30691 "2021-12-14T12:41:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fslef](https://avatars.discourse-cdn.com/v4/letter/f/e99b99/32.png) [@fslef](https://community.postman.com/u/fslef)\
**Post date:** [December 14, 2021, 12:41pm UTC](https://community.postman.com/t/how-to-parse-json-array-of-object/30691/1 "2021-12-14T12:41:04Z")

</div>

Hello,

I’m using Postman to query the Azure Rest API.  
My query is returning a Json formated this way:

```auto
{
   "value":[
      {
         "id":"ID1",
         "name":"Obj1",
         "properties":{
            "objProp":"MyProperty"
         }
      },
	        {
         "id":"ID2",
         "name":"Obj2",
         "properties":{
            "objProp":"MyProperty"
         }
      }
   ]
}

```

Is there a way to parse the Json ?

I’m trying to achieve 2 things:

1. 
  - I want to receive the same Json Payload but without the "Value:[…]. Is it possible ?

2. 
  - I wanted to use the visualizer to make it more readable inside Postman

For my goal N2, I used this code in the test tab:

```auto
`var template = `
    <table>
        <tr bgcolor="#50a9f2">
            <th>ID</th>
            <th>name</th>
            <th>objProp</th>

        </tr>
        {{#each response}}
            <tr>
                <td>{{ID}}</td>            
                <td>{{name}}</td>
                <td>{{Objprop}}</td>
            </tr>
        {{/each}}
        
    </table>
`;

pm.visualizer.set(template, {
    response: pm.response.json()
});
`

```

Could you please help me to understand what I’m doing wrong ?  
Thank you,

---

<div class="post-metadata">

**Author:** ![Vashanth\_S](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@Vashanth\_S](https://community.postman.com/u/Vashanth_S)\
**Post date:** [December 15, 2021, 2:47pm UTC](https://community.postman.com/t/how-to-parse-json-array-of-object/30691/2 "2021-12-15T14:47:52Z")

</div>

@fslef As it’s looping through `response`, `response` can be an array of objects, can you try passing like this to visualizer

```auto
pm.visualizer.set(template, {
    response: pm.response.json().value
});

```

And also in the template, the key names should match the response json’s case sensitivity, like it can have

```auto
<td>{{id}}</td>
<td>{{name}}</td>
<td>{{properties.objProp}}</td>

```

---

<div class="post-metadata">

**Author:** ![fslef](https://avatars.discourse-cdn.com/v4/letter/f/e99b99/32.png) [@fslef](https://community.postman.com/u/fslef)\
**Post date:** [December 15, 2021, 9:35pm UTC](https://community.postman.com/t/how-to-parse-json-array-of-object/30691/3 "2021-12-15T21:35:57Z")

</div>

it works. Thank you @Vashanth_S
