Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.
Here’s an outline with best practices for making your inquiry.
My question:
I am using an API call to get a JSON result and then visualizing that into a table format. Some of the JSON calls are limited to maybe 50 queries each time. I’d like to put the “isLast” or “total” count in the table somewhere but I can’t figure out how to do it.
Details (like screenshots):
I can get the name (which I need) but I can’t seem to get the “isLast” information to appear in the visualize 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: #87ceeb;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 bgcolor="#FFFFFF">
<tr>
<th>Name</th>
<th>IsLast?</th>
</tr>
{{#each response.values}}
<tr>
<td>{{name}}</td>
{{#each isLast}}
<tr>
<td rowspan=1>{{isLast}}</td>
{{/each}}
</tr>
{{/each}}
</table>
`;
// Set visualizer
pm.visualizer.set(template, {
// Pass the response body parsed as JSON as `data`
response: pm.response.json()
});
I’ve already tried:
I’ve tried playing around with adding different {{#each response}} options but nothing seems to work properly.