How to access array element by index in mustache in template node

use .0 instead of [0]

[{"id":"12a4c5dc.63ca2a","type":"template","z":"dadb596f.70e948","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This works: {{{payload.text}}}, and this not: {{{payload.template.fields[0]}}} but this does... {{{payload.template.fields.0}}} !","output":"str","x":600,"y":100,"wires":[["cad92c2c.cb817"]]}]
This works: {{{payload.text}}}, and this too: {{{payload.template.fields.0}}}!
6 Likes