I would like to visualize the data below in Postman Tests as a Table with product
, price
and quantity
in columns and Items
in rows. There might be multiple shippingGroups.
{
...
"companyGroups": [
{
...
"shippingGroups": [
{
"id": 1,
"items": [
{
"product": "Product A",
"price": 2,
"quantity": 1,
},
{
"product": "Product B",
"price": 4,
"quantity": 4,
}
],
...
]
}
],
I have trouble using the {{#each response???}}
referring to items within multiple level objects. Expected format should be something like :
<table>
<tr>
<th>Product</th>
<th>Price</th>
<th>Quantity</th>
</tr>
{{#each response???}}
<tr>
<td>{{???product}}</td>
<td>{{???price}}</td>
<td>{{???quantity}}
</tr>
{{/each}}
</table>
More info on Postman Table Visualizing Response here