# Visualising Nested JSON as comma separated values in table

**URL:** <https://community.postman.com/t/visualising-nested-json-as-comma-separated-values-in-table/44210>\
**Category:** Help Hub\
**Tags:** tests, json, visualizer\
**Created:** [February 20, 2023, 1:09pm UTC](https://community.postman.com/t/visualising-nested-json-as-comma-separated-values-in-table/44210 "2023-02-20T13:09:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanbetts](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/seanbetts/32/14945_2.png) [@seanbetts](https://community.postman.com/u/seanbetts)\
**Post date:** [February 20, 2023, 1:09pm UTC](https://community.postman.com/t/visualising-nested-json-as-comma-separated-values-in-table/44210/1 "2023-02-20T13:09:11Z")

</div>

Hello,

I have a simple endpoint that returns some nested JSON in the following format:

```auto
"3809269890": {
            "item_id": "3809269890",
            "resolved_id": "3809269890",
            "given_url": "https://youtube.com/watch?v=eOVB_ewTV1I&feature=share",
            "given_title": "",
            "favorite": "0",
            "status": "1",
            "time_added": "1676736062",
            "time_updated": "1676763950",
            "time_read": "1676763949",
            "time_favorited": "0",
            "sort_id": 2,
            "resolved_title": "QUANTUMANIA POST-CREDIT SCENES BREAKDOWN (Spoilers!)",
            "resolved_url": "https://youtube.com/watch?v=eOVB_ewTV1I&feature=share",
            "excerpt": "Ant-Man and the Wasp Quantumania TWO post-credit scenes and ending explained! SPOILER WARNING: DO NOT WATCH IF YOU HAVEN'T SEEN QUANTUMANIA! To get your e-bike and free accessory today go to https://hovsco.com and use promo code ROCKSTAR1 at checkout!\n\nSubscribe to Erik's new channel, The Deep Dive,",
            "is_article": "0",
            "is_index": "0",
            "has_video": "2",
            "has_image": "1",
            "word_count": "0",
            "lang": "en",
            "tags": {
                "marvel": {
                    "item_id": "3809269890",
                    "tag": "marvel"
                },
                "movies": {
                    "item_id": "3809269890",
                    "tag": "movies"
                }
            },

```

I am parsing this data in Postman to put certain values into a Table using the following code:

```auto
var template = `
    <table bgcolor="#FFFFFF">
        <tr>
            <th>Unix Time Added</th>
            <th>Title</th>
            <th>Tags</th>
            <th>URL</th>
            <th>Excerpt</th>
        </tr>

        {{#each response.list}}
            <tr>
                <td>{{time_added}}</td>
                <td>{{resolved_title}}</td>
                {{#each tags}}
                    <td>{{tag}}, {{tag}}</td>
                {{/each}}
                <td>{{resolved_url}}</td>
                <td>{{excerpt}}</td>
            </tr>
        {{/each}}
    </table>
`;

// Set visualizer
pm.visualizer.set(template, {
    // Pass the response body parsed as JSON as `data`
    response: pm.response.json()
});

```

This creates a table as follows:

 ![Screenshot 2023-02-20 at 13.08.07](https://us1.discourse-cdn.com/getpostman/original/3X/7/c/7c7a6c949be83406105416354971c96f6cc62882.png)

I’m trying to find a way to have the multiple tags that are nested in the JSON displayed as comma separated values in one cell in the table but I’m not sure if this is possible?

Thanks in advance for any help or tips!

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [February 20, 2023, 2:03pm UTC](https://community.postman.com/t/visualising-nested-json-as-comma-separated-values-in-table/44210/2 "2023-02-20T14:03:10Z")

</div>

I don’t know about adding the comma, but based on the example shouldn’t the rows be set using the following, otherwise its repeating the same tag.

```auto
<tr>
    <td>{{time_added}}</td>
    <td>{{resolved_title}}</td>
    <td>
        {{#each tags}}
            {{tag}}
        {{/each}}
    </td>
    <td>{{resolved_url}}</td>
    <td>{{excerpt}}</td>
</tr>

```

Which gives the following…

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/f/4/f418d49a48912728dea853b6a51ca9c79d7134d7.png)

---

<div class="post-metadata">

**Author:** ![seanbetts](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/seanbetts/32/14945_2.png) [@seanbetts](https://community.postman.com/u/seanbetts)\
**Post date:** [February 20, 2023, 2:05pm UTC](https://community.postman.com/t/visualising-nested-json-as-comma-separated-values-in-table/44210/3 "2023-02-20T14:05:04Z")

</div>

Ah yes, that does it! Thank you. Having the comma isn’t an absolutely necessity, so this answers my query - thank you again for your help!
