From fd93fef73e73796924b618dad152c403b5b3b0d0 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 27 Jun 2017 21:52:48 +0100 Subject: [PATCH] Better template node help example --- nodes/core/core/80-template.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nodes/core/core/80-template.html b/nodes/core/core/80-template.html index 9c3d83e21..7de22b06a 100644 --- a/nodes/core/core/80-template.html +++ b/nodes/core/core/80-template.html @@ -63,12 +63,13 @@

By default this uses the mustache format, but this can be switched off if required.

For example, when a template of: -

Hello {{name}}. Today is {{date}}
+
Hello {{payload.name}}. Today is {{date}}

receives a message containing:

{
-  name: "Fred",
   date: "Monday"
-  payload: ...
+  payload: {
+    name: "Fred",
+  }
 }

The resulting property will be:

Hello Fred. Today is Monday