# Display array from sort node in template list

**URL:** <https://discourse.nodered.org/t/display-array-from-sort-node-in-template-list/54303>\
**Category:** Dashboard\
**Created:** [26 November 2021 06:52 UTC](https://discourse.nodered.org/t/display-array-from-sort-node-in-template-list/54303 "2021-11-26T06:52:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nice\_to\_have](https://avatars.discourse-cdn.com/v4/letter/n/edb3f5/32.png) [@Nice\_to\_have](https://discourse.nodered.org/u/Nice_to_have)\
**Post date:** [26 November 2021 06:52 UTC](https://discourse.nodered.org/t/display-array-from-sort-node-in-template-list/54303/1 "2021-11-26T06:52:12Z")

</div>

Good day,

I have an array of objects that I sort in a sort node.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/a/aa3b6dca18aa5ff725df13ddbb43db860b3e774e.png)

I then want to display them in a list which I try using this in the template node:

```auto
<table class="table">
    <tr>
        <th style="width:10em;">MMSI</th>
        <th>Distance</th>
    </tr>
    <tr ng-repeat="event in msg.payload">
        <td>{{::msg.payload[0].senderMmsi}}</td>
        <td>{{::msg.payload[0].DistanceToWaypointKM}}</td>
    </tr>
</table>

```

But this way I only show the first object (msg.payload[0].senderMmsi & msg.payload[0].DistanceToWaypointKM)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/0/407f06102a7cb3a74e3d45d986b7f02d8c7a00e8.png)

How can I display the complete array in the list?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 November 2021 07:29 UTC](https://discourse.nodered.org/t/display-array-from-sort-node-in-template-list/54303/2 "2021-11-26T07:29:59Z")

</div>

Try calling the event not msg.payload

```auto
<td>{{event.senderMmsi}}</td>
 <td>{{event.DistanceToWaypointKM}}</td>

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 December 2021 07:30 UTC](https://discourse.nodered.org/t/display-array-from-sort-node-in-template-list/54303/3 "2021-12-10T07:30:16Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
