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

If it is the regular template (the orange node), then no, that wont work.

But the answer is on the forum - hundreds of times and in the mustache docs

In short, {{payload.data.0}}


If on the otherhand, you are refering to the ui-template node (the light blue node), then the built in help tells you to use scope and watch

Tons of examples on the forum too: