# Access data in template node using mustache

**URL:** <https://discourse.nodered.org/t/access-data-in-template-node-using-mustache/7441>\
**Category:** General\
**Created:** [31 January 2019 17:17 UTC](https://discourse.nodered.org/t/access-data-in-template-node-using-mustache/7441 "2019-01-31T17:17:46Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [31 January 2019 17:45 UTC](https://discourse.nodered.org/t/access-data-in-template-node-using-mustache/7441/2 "2019-01-31T17:45:11Z")

</div>

You need to return an object. so make them all part of that object  
eg

`msg.hour` `msg.year` etc  
Also when sharing code Please read the following post [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506?u=ukmoose) it makes it so much easier to read

---

_[View the full topic](https://discourse.nodered.org/t/access-data-in-template-node-using-mustache/7441)._
