Well, the flow like below:
produces the right xml, but this is not the case here, let's skip the xml, simplified flow that shows the issue below, just the nested array value (template.fields[0]) is empty when used in template.
Data:
{
"text": "sure",
"template": {
"fields": ["some name"]
}
}
Template:
This works: {{{payload.text}}}, and this not: {{{payload.template.fields[0]}}}!
[{"id":"a6885cfc.a7045","type":"inject","z":"e4c94bd5.d53538","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":660,"wires":[["80cdd649.aa6a18"]]},{"id":"80cdd649.aa6a18","type":"change","z":"e4c94bd5.d53538","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{ \t\"text\": \"sure\", \t\"template\": { \t\t\"fields\": [\"some name\"] \t} }","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":300,"y":660,"wires":[["3befd0f8.c7f39"]]},{"id":"3befd0f8.c7f39","type":"template","z":"e4c94bd5.d53538","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"This works: {{{payload.text}}}, and this not: {{{payload.template.fields[0]}}}!","output":"str","x":480,"y":660,"wires":[["77d87954.9800a8"]]},{"id":"77d87954.9800a8","type":"debug","z":"e4c94bd5.d53538","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":640,"y":660,"wires":[ ]}]