# How do I run a collection with a visualize output

**URL:** <https://community.postman.com/t/how-do-i-run-a-collection-with-a-visualize-output/30233>\
**Category:** Help Hub\
**Created:** [November 30, 2021, 7:13pm UTC](https://community.postman.com/t/how-do-i-run-a-collection-with-a-visualize-output/30233 "2021-11-30T19:13:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![zara\_72](https://avatars.discourse-cdn.com/v4/letter/z/d26b3c/32.png) [@zara\_72](https://community.postman.com/u/zara_72)\
**Post date:** [November 30, 2021, 7:13pm UTC](https://community.postman.com/t/how-do-i-run-a-collection-with-a-visualize-output/30233/1 "2021-11-30T19:13:40Z")

</div>

Hi how do i run a collection with a visualize out put  
here is the test code  
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;}a

</style>

<table class="tftable" border="1">

    <tr>

        <th>id</th>

        <th>account_id</th>

        <th>Ref id</th>

        <th>description</th>

        <th>created_at</th>

        <th>folder</th>

        <th>thumbnail</th>

        <th>text_tracks</th>

        <th>published_at</th>

    </tr>

    {{#each response}}

        <tr>

            <td>{{id}}</td>

            <td>{{account_id}}</td>

            <td>{{reference_id}}</td>

            <td>{{description}}</td>

            <td>{{created_at}}</td>

            <td>{{folder}}</td>

            <td>{{tnsrc}}</td>

            <td>{{ttsrc}}</td>

            <td>{{published_at}}</td>

        </tr>

    {{/each}}

</table>

```

`;

// Set visualizer

pm.visualizer.set(template, {

```
response: JSON.parse(responseBody)

```

});

thanks

---

<div class="post-metadata">

**Author:** ![jmaugeri](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jmaugeri](https://community.postman.com/u/jmaugeri)\
**Post date:** [December 1, 2021, 2:54pm UTC](https://community.postman.com/t/how-do-i-run-a-collection-with-a-visualize-output/30233/2 "2021-12-01T14:54:32Z")

</div>

From this documentation page ([https://learning.postman.com/docs/sending-requests/visualizer/#rendering-html](https://learning.postman.com/docs/sending-requests/visualizer/#rendering-html)) it looks like you need to use `response: pm.response.json()` instead of `JSON.parse(responseBody)`, I think responseBody was an older method? If that doesn’t work, please post any errors you’re receiving.

---

<div class="post-metadata">

**Author:** ![zara\_72](https://avatars.discourse-cdn.com/v4/letter/z/d26b3c/32.png) [@zara\_72](https://community.postman.com/u/zara_72)\
**Post date:** [December 1, 2021, 6:03pm UTC](https://community.postman.com/t/how-do-i-run-a-collection-with-a-visualize-output/30233/3 "2021-12-01T18:03:22Z")

</div>

Hi @jmaugeri , thanks for your reply.  
I have managed to run a visualize output with 1 request. I want to be able to run a collection of requests and I wandered how I would to that with a table visualize output  
Please see my attachment

 ![pm-2021-12-01-17.55](https://us1.discourse-cdn.com/getpostman/original/2X/a/a036d5fdcf2b95fd7eb8437114805769ebb41644.jpeg)

I just need help with that.  
Thanks  
Zara

---

<div class="post-metadata">

**Author:** ![jmaugeri](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jmaugeri](https://community.postman.com/u/jmaugeri)\
**Post date:** [December 1, 2021, 7:36pm UTC](https://community.postman.com/t/how-do-i-run-a-collection-with-a-visualize-output/30233/4 "2021-12-01T19:36:57Z")

</div>

You would need to store all of the JSON response data in one larger JSON object and then pass that object to the visualizer when you’re done with your final request.

---

<div class="post-metadata">

**Author:** ![zara\_72](https://avatars.discourse-cdn.com/v4/letter/z/d26b3c/32.png) [@zara\_72](https://community.postman.com/u/zara_72)\
**Post date:** [December 1, 2021, 7:44pm UTC](https://community.postman.com/t/how-do-i-run-a-collection-with-a-visualize-output/30233/5 "2021-12-01T19:44:34Z")

</div>

Hi @jmaugeri ,  
I have stored the data in a JSON response object please below.

{

```
"id": "{{id}}",
"account_id": "{{account_id}}",
"reference_id": "{{reference_id}}",
"folder_id": "{{folder_id}}",
"created_at": "{{created_at}}",
"published_at": "{{published_at}}",
"images": {
    "thumbnail": {
        "src": "{{tnsrc}}"
    }
},
"text_tracks": [{
    "src": "{{ttsrc}}"
}]

```

}

//  
Can I ask you, how do I pass the object to the visualizer when done with your final request.  
Thanks for your help  
Zara

---

<div class="post-metadata">

**Author:** ![zara\_72](https://avatars.discourse-cdn.com/v4/letter/z/d26b3c/32.png) [@zara\_72](https://community.postman.com/u/zara_72)\
**Post date:** [December 2, 2021, 6:58pm UTC](https://community.postman.com/t/how-do-i-run-a-collection-with-a-visualize-output/30233/6 "2021-12-02T18:58:13Z")

</div>

Hi @jmaugeri,  
I tried adding the collection but the output was not visualized

 ![Screenshot-2021-12-02-18.54-collection](https://us1.discourse-cdn.com/getpostman/original/2X/6/6abd715bf38e6e4763e061a1dda27e2bfed9c120.jpeg)  
if you could help that would be great  
zara
