# Visualization Nested Object

**URL:** <https://community.postman.com/t/visualization-nested-object/10825>\
**Category:** Help Hub\
**Tags:** tests, visualizer\
**Created:** [February 14, 2020, 10:32pm UTC](https://community.postman.com/t/visualization-nested-object/10825 "2020-02-14T22:32:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rainwave22](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/rainwave22/32/3833_2.png) [@rainwave22](https://community.postman.com/u/rainwave22)\
**Post date:** [February 14, 2020, 10:32pm UTC](https://community.postman.com/t/visualization-nested-object/10825/1 "2020-02-14T22:32:46Z")

</div>

New to Visualizer

I cant seem to get this nested array to visualize

```
{
  "stations": [
    {
      "stationID": "44444",
      "stationNumber": "4444"
    },
    {
      "stationID": "44444",
      "stationNumber": "4444"
    }
  ]
}

```

I am sure there is an easy answer. But I am stuck!!

🙂

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [February 15, 2020, 11:40am UTC](https://community.postman.com/t/visualization-nested-object/10825/2 "2020-02-15T11:40:17Z")

</div>

Hey @rainwave22

Welcome to the community! ⭐

Something like this, added to the `Tests` sandbox, should do it for you if that’s the full response body:

```
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 class="tftable" border="1">
        <tr>
            <th>Station ID</th>
            <th>Station Number</th>
        </tr>
        
        {{#each response.stations}}
            <tr">
                <td>{{stationID}}</td>
                <td>{{stationNumber}}</td>
            </tr>
        {{/each}}
    </table>
`;

pm.visualizer.set(template, {
    response: pm.response.json()
});

```

I modified an example template that you can import from here:

[https://explore.postman.com/templates/3223/visualizer-examples](https://explore.postman.com/templates/3223/visualizer-examples)

---

<div class="post-metadata">

**Author:** ![rainwave22](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/rainwave22/32/3833_2.png) [@rainwave22](https://community.postman.com/u/rainwave22)\
**Post date:** [February 16, 2020, 1:08am UTC](https://community.postman.com/t/visualization-nested-object/10825/3 "2020-02-16T01:08:43Z")

</div>

Cheers Mate!!! That worked great

---

<div class="post-metadata">

**Author:** ![rainwave22](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/rainwave22/32/3833_2.png) [@rainwave22](https://community.postman.com/u/rainwave22)\
**Post date:** [March 3, 2020, 11:02pm UTC](https://community.postman.com/t/visualization-nested-object/10825/4 "2020-03-03T23:02:09Z")

</div>

@danny-dainton

I have one more for you if you do not mind  
Trying to parse the nested properties but I can only get as far as ID Type and name using  
{{#each response.value}}

{  
“value”: [  
{  
“id”:  
“type”:  
“name”:  
**“properties”: {**  
\*\* “ownerId”: \*\*  
\*\* “scope”: \*\*  
\*\* “displayName”: \*\*  
\*\* “state”: “active”,\*\*  
\*\* “createdDate”: \*\*  
\*\* “startDate”: \*\*  
\*\* “expirationDate”: null,\*\*  
\*\* “endDate”: null,\*\*  
\*\* “notificationDate”: null,\*\*  
\*\* “primaryKey”: \*\*  
\*\* “secondaryKey”: \*\*  
\*\* “stateComment”: null\*\*  
}

Any thoughts

🙂

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [March 3, 2020, 11:42pm UTC](https://community.postman.com/t/visualization-nested-object/10825/5 "2020-03-03T23:42:25Z")

</div>

You just need to reference the `properties` key and then the items within it, if that’s what you mean?

As an example, taken from the previous message in the thread:

```
<table class="tftable" border="1">
    <tr>
        <th>State</th>
        <th>Display Name</th>
    </tr>
    
    {{#each response.value}}
        <tr>
            <td>{{properties.state}}</td>
            <td>{{properties.displayName}}</td>
        </tr>
    {{/each}}
</table>

```

Or you could use the `{{#with}}` block helper like this:

```
<table class="tftable" border="1">
    <tr>
        <th>State</th>
        <th>Display Name</th>
    </tr>
    
    {{#each response.value}}
        <tr>
        {{#with properties}}
            <td>{{state}}</td>
            <td>{{displayName}}</td>
        {{/with}}
        </tr>
    {{/each}}
</table>

```

Is that what you’re after?

---

<div class="post-metadata">

**Author:** ![rainwave22](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/rainwave22/32/3833_2.png) [@rainwave22](https://community.postman.com/u/rainwave22)\
**Post date:** [March 4, 2020, 5:08pm UTC](https://community.postman.com/t/visualization-nested-object/10825/6 "2020-03-04T17:08:09Z")

</div>

KING!!

Thank you soo much

---

<div class="post-metadata">

**Author:** ![mramirem](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@mramirem](https://community.postman.com/u/mramirem)\
**Post date:** [February 3, 2023, 6:17pm UTC](https://community.postman.com/t/visualization-nested-object/10825/7 "2023-02-03T18:17:52Z")

</div>

hello friend danny, I want you to help me with a little problem, it happens that I can’t make a value visible.

I am attaching my Json response.

I would like to add the part marked in yellow, but I can’t.

 {{#each response.result}} {{#each data}}

```
            <tr> 
                    <td>{{this.dimensions}}</td>
                    <td>{{dimensionMap.dt.entity.os}}</td>
            </tr> 
            
        {{/each}}
    {{/each}} 

```

From already thank you very much. If you help me, I’ll send you a Peruvian ceviche.

 ![json 2](https://us1.discourse-cdn.com/getpostman/original/3X/c/2/c2a1983a45cf9100d129de412d8a9f02b60f2ca9.png)  
 ![json](https://us1.discourse-cdn.com/getpostman/original/3X/d/1/d157641e587a1446dabfb2c7e6aa4e61ad329eba.png)

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [February 3, 2023, 9:14pm UTC](https://community.postman.com/t/visualization-nested-object/10825/8 "2023-02-03T21:14:51Z")

</div>

I’m not sure of the full context but you could use:

```html
{{#each response.result}} 
    {{#each data}}
        <tr> 
            <td>{{this.dimensionMap.[dt.entity.os]}}</td>
            <td>{{this.dimensionMap.[App Version]}}</td>
        </tr>    
    {{/each}}
    {{/each}}

```

I was just messing about with some dummy example response:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/5/c/5c7d455a10aa2f953b62e0abb1466de77902dd41.png)

---

<div class="post-metadata">

**Author:** ![mission-cosmonaut-61](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@mission-cosmonaut-61](https://community.postman.com/u/mission-cosmonaut-61)\
**Post date:** [August 29, 2023, 11:21pm UTC](https://community.postman.com/t/visualization-nested-object/10825/9 "2023-08-29T23:21:38Z")

</div>

Hey @danny-dainton was wondering if you could assist me with this nested objects under “accounts” i.e. aid, account\_id and the roles especially.

```auto
{
    "data": [
        {
            "id": "123456987",
            "accounts": [
                {
                    "aid": 1234,
                    "account_id": "987654321",
                    "roles": [
                        "ADMIN",
                        "SALES"
                    ],
                    "granted_by": "9632587410",
                    "created": "1999-99-01T00:00:00.000Z",
                    "updated": "1999-99-01T00:00:00.000Z",
                    "auth0_connections": null,
                    "expiration": "0001-01-01T00:00:00Z"
                }
            ],

```

Looking forward to your response. Tried the solution but didnt work.
