How to parse Json Array of object

Hello,

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

{
   "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:

    • I want to receive the same Json Payload but without the "Value:[…]. Is it possible ?
    • 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:

`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,

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

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

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

it works. Thank you @Vashanth_S