# Use msg.payload.data in template inside \<script\> tag

**URL:** <https://discourse.nodered.org/t/use-msg-payload-data-in-template-inside-script-tag/80204>\
**Category:** General\
**Created:** [1 August 2023 07:43 UTC](https://discourse.nodered.org/t/use-msg-payload-data-in-template-inside-script-tag/80204 "2023-08-01T07:43:10Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [1 August 2023 08:14 UTC](https://discourse.nodered.org/t/use-msg-payload-data-in-template-inside-script-tag/80204/2 "2023-08-01T08:14:54Z")

</div>

is it the same issue as this ?

> [@Extracting text from object using mustache template](https://discourse.nodered.org/t/extracting-text-from-object-using-mustache-template/79370/2):
>
> FYI: This has been asked and answered [many many times already](https://discourse.nodered.org/search?q=mustache%20array) Dont use [x], use .x. instead {{payload.0.Text}} {{payload.1.Text}} {{payload.2.Text}} {{payload.?.Text}} and so on Even better: {{#payload}} {{Text} {{/payload}}

---

_[View the full topic](https://discourse.nodered.org/t/use-msg-payload-data-in-template-inside-script-tag/80204)._
