# Template Node (array integration)

**URL:** <https://discourse.nodered.org/t/template-node-array-integration/14580>\
**Category:** General\
**Created:** [21 August 2019 03:11 UTC](https://discourse.nodered.org/t/template-node-array-integration/14580 "2019-08-21T03:11:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![blade2021](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/blade2021/32/11176_2.png) [@blade2021](https://discourse.nodered.org/u/blade2021)\
**Post date:** [21 August 2019 03:11 UTC](https://discourse.nodered.org/t/template-node-array-integration/14580/1 "2019-08-21T03:11:45Z")

</div>

Hi all,

Having trouble grabbing values from an array using the template node. I did some skimming on google but didn't find a real clear answer. Seen a bunch of "Attach it to a debug node and look for the results..."

This is what is coming out of my join node as an array:

```auto
{"_msgid":"21936ce2.9c0954","topic":"","payload":["2019-08-19T23:00:00-05:00","2019-08-20T24:00:00-05:00"]}

```

However when passing it to a template node:  
Template Node code:

```auto
start={{payload.[1]}}

```

Template Node Output:

```auto
{"_msgid":"21936ce2.9c0954","topic":"","payload":"start="}

```

I do something similar with a function node and get the expected result. I prefer to use the template node for simplicity if possible. If not, not a biggie.

Thanks, Matt

---

<div class="post-metadata">

**Author:** ![mike](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mike/32/10_2.png) [@mike](https://discourse.nodered.org/u/mike)\
**Post date:** [21 August 2019 03:46 UTC](https://discourse.nodered.org/t/template-node-array-integration/14580/2 "2019-08-21T03:46:52Z")

</div>

Try

```auto
start={{payload.1}}

```

-- Mike

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [21 August 2019 05:31 UTC](https://discourse.nodered.org/t/template-node-array-integration/14580/3 "2019-08-21T05:31:09Z")

</div>

@mike Does the template node prefer JSONanata like syntax for accessing elements? 🤔 Didn’t know that trick, thanks

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [21 August 2019 06:41 UTC](https://discourse.nodered.org/t/template-node-array-integration/14580/4 "2019-08-21T06:41:45Z")

</div>

No. Its mustache syntax in the template node

---

<div class="post-metadata">

**Author:** ![blade2021](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/blade2021/32/11176_2.png) [@blade2021](https://discourse.nodered.org/u/blade2021)\
**Post date:** [21 August 2019 13:10 UTC](https://discourse.nodered.org/t/template-node-array-integration/14580/5 "2019-08-21T13:10:27Z")

</div>

Thanks Mike.
