【发布时间】:2020-07-28 03:12:16
【问题描述】:
我想将 Postman 测试中的以下数据可视化为表格,其中 product、price 和 quantity 在列中,Items 在行中。可能有多个 shippingGroups。
{
...
"companyGroups": [
{
...
"shippingGroups": [
{
"id": 1,
"items": [
{
"product": "Product A",
"price": 2,
"quantity": 1,
},
{
"product": "Product B",
"price": 4,
"quantity": 4,
}
],
...
]
}
],
我在使用 {{#each response???}} 引用多个级别对象中的项目时遇到问题。预期的格式应该是这样的:
<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>
有关邮递员表可视化响应here 的更多信息
【问题讨论】:
标签: javascript html json postman postman-testcase