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,