# Ng-repeat an array of upto 20 objects

**URL:** <https://discourse.nodered.org/t/ng-repeat-an-array-of-upto-20-objects/44735>\
**Category:** Dashboard\
**Created:** [26 April 2021 09:23 UTC](https://discourse.nodered.org/t/ng-repeat-an-array-of-upto-20-objects/44735 "2021-04-26T09:23:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![geoseph](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/geoseph/32/39526_2.png) [@geoseph](https://discourse.nodered.org/u/geoseph)\
**Post date:** [26 April 2021 09:23 UTC](https://discourse.nodered.org/t/ng-repeat-an-array-of-upto-20-objects/44735/1 "2021-04-26T09:23:45Z")

</div>

So I have flow that produces an output on the payload of an array that contains anywhere from 0-20 objects, where each object looks like the following:

```auto
{
   "tx_id":"0x5e7d692de72b3b66b013090618eb4a3c2712ad1592253ce42531f61ae9df7aa3",
   "tx_type":"token_transfer",
   "nonce":795,
   "fee_rate":"180",
   "sender_address":"SP33XEHK2SXXH625VG6W6665WBBPX1ENQVKNEYCYY",
   "sponsored":false,
   "post_condition_mode":"deny",
   "tx_status":"success",
   "block_hash":"0xcf74c686e04f139b1fa1d7bbb612846070d89393024d086cfc5e9b19e8df31f8",
   "block_height":12491,
   "burn_block_time":1619423774,
   "burn_block_time_iso":"2021-04-26T07:56:14.000Z",
   "canonical":true,
   "tx_index":1,
   "tx_result":{
      "hex":"0x0703",
      "repr":"(ok true)"
   },
   "token_transfer":{
      "recipient_address":"SP1P72Z3704VMT3DMHPP2CB8TGQWGDBHD3RPR9GZS",
      "amount":"248328688",
      "memo":"0x31303537303932333500000000000000000000000000000000000000000000000000"
   },
   "events":[
      
   ],
   "event_count":1
}

```

I'm trying to present these properties of each object(s) in the array in a template node, I figured I would just start out by trying to sequentially present the `tx_id` property.

```auto
<table>
    <tr ng-repeat="obj in msg.payload track by $index">
        <td>{{msg.payload[0].tx_id}}</td>
    </tr>
</table>

```

But this just repeats the literal string from the first object 20 times, instead of walking through each object and present the relative `.tx_id`.

Any help would be appreciated, this part always trips me up lol

---

<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 April 2021 09:39 UTC](https://discourse.nodered.org/t/ng-repeat-an-array-of-upto-20-objects/44735/2 "2021-04-26T09:39:15Z")

</div>

Try

```auto
<table>
    <tr ng-repeat="obj in msg.payload">
        <td>{{obj.tx_id}}</td>
    </tr>
</table>

```

---

<div class="post-metadata">

**Author:** ![geoseph](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/geoseph/32/39526_2.png) [@geoseph](https://discourse.nodered.org/u/geoseph)\
**Post date:** [26 April 2021 09:52 UTC](https://discourse.nodered.org/t/ng-repeat-an-array-of-upto-20-objects/44735/3 "2021-04-26T09:52:07Z")

</div>

> [@E1cid](#):
>
> ```auto
> <table>
> <tr ng-repeat="obj in msg.payload">
> <td>{{obj.tx_id}}</td>
> </tr>
> </table>
> 
> ```

Thanks buddy, I knew i was overthinking this lul!

---

<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 May 2021 09:52 UTC](https://discourse.nodered.org/t/ng-repeat-an-array-of-upto-20-objects/44735/4 "2021-05-10T09:52:09Z")

</div>

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