Template
Sets a property based on the provided template.
Last updated
Sets a property based on the provided template.
Last updated
msg
(object) : A msg object containing information to populate the template.
template
(string) : A template to be populated from msg.payload. If not configured in the edit panel, this can be set as a property of msg.
msg
(object) : a msg with a property set by populating the configured template with properties from the incoming msg.
By default this uses the mustache format, but this can be switched off if required.
For example, when a template of:
receives a message containing:
The resulting property will be:
It is possible to use a property from the flow context or global context. Just use {{flow.name}}
or {{global.name}}
, or for persistable store store
use {{flow[store].name}}
or {{global[store].name}}
.
**Note: **By default, mustache will escape any non-alphanumeric or HTML entities in the values it substitutes. To prevent this, use {{{triple}}}
braces.