I am trying to visualize a nested json response but am not able to correctly format test
this is the response
{
"data": [
{
"Messages": null,
"Family": [
{
"Siblings": [
{
"Sibling": "Chris",
},
{
"Sibling": "Jenny",
}
]
}
],
"Appearance": {
"hair": "black"
},
"Color": {
"Skin": "brown"
}
},
]
}
This is my test section
var template = `
<style type="text/css">
.tftable {font-size:14px;color:#333333;width:100%;border-width: 1px;border-color: #87ceeb;border-collapse: collapse;}
.tftable th {font-size:18px;background-color:#87ceeb;border-width: 1px;padding: 8px;border-style: solid;border-color: #ffffff;text-align:left;}
.tftable tr {background-color:#ffffff;}
.tftable td {font-size:14px;border-width: 1px;padding: 8px;border-style: solid;border-color: #87ceeb;}
.tftable tr:hover {background-color:#e0ffff;}
</style>
<table class="tftable" border="1">
<tr>
<th>Sibling</th>
<th>Hair</th>
<th>Skin</th>
</tr>
{{#each response.data}}
<tr>
<td>{{Sibling}}</td>
<td>{{Hair}}</td>
<td>{{Skin}}</td>
</tr>
{{/each}}
</table>
`;
pm.visualizer.set(template, {
response: pm.response.json()
});