i'm trying to grasp mustache syntax, Just set up a little test flow and i keep falling on my a$$. can someone take a peak at this and give me a nudge of guidance?[{"id":"29358637.fad68a","type":"debug","z":"e8566d8f.d29e2","name":"","active":true,"console":"false","complete":"false","x":1796.6666666666665,"y":631.1111111111111,"wires":[]},{"id":"3ff35c3c.2279e4","type":"template","z":"e8566d8f.d29e2","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Hello {{name}}. Today is {{date}}","x":1638,"y":565,"wires":[["29358637.fad68a"]]},{"id":"2a7275c2.f8b47a","type":"inject","z":"e8566d8f.d29e2","name":"","topic":"","payload":"{ name: \"Fred\", date: \"Monday\" payload: ... }","payloadType":"str","repeat":"","crontab":"","once":false,"x":1574,"y":391,"wires":[["3ff35c3c.2279e4"]]}]
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
//change 1's and 0's to ON and OFF
msg.payload.forEach(function(o){if (o.Machine_On === 1) o.Machine_On = "ON ";if (o.Machine_On === 0) o.Machine_On = "OFF";});msg.payload.forEach(function(o){ o.Moisture = o.Moisture.substring(1,2); });
for (var i = 0, len = msg.payload.length; i < len; i++) {var element = msg.payload[i];console.log(typeof element, element);element.Time = element.Time.substring(11,16);}
return msg;
[{"id":"925c9bba.8f9d48","type":"moment","z":"462586cc.55d938","name":"","topic":"","input":"payload.time","inputType":"msg","inTz":"Europe/London","adjAmount":0,"adjType":"days","adjDir":"add","format":"HH:mm","locale":"en_GB","output":"","outputType":"msg","outTz":"Europe/London","x":460,"y":1160,"wires":[["ae2ae65a.94de38"]]},{"id":"2cba53d0.5cad2c","type":"inject","z":"462586cc.55d938","name":"","topic":"","payload":"[ { \"Time\": \"2016-08-03T16:08:17.000Z\", \"Moisture\": 16.1, \"Grain_Temp\": 118, \"Ave_Moist\": 16.2, \"Machine_On\": 0, \"Target_Temp\": 180, \"Actual_Temp\": 178, \"Air_Temp\": 82.9, \"Humdity\": 80, \"Static_Pressure\": 0 }, { \"Time\": \"2016-08-02T21:04:01.000Z\", \"Moisture\": 16.1, \"Grain_Temp\": 118, \"Ave_Moist\": 16.2, \"Machine_On\": 0, \"Target_Temp\": 180, \"Actual_Temp\": 178, \"Air_Temp\": 0, \"Humdity\": 0, \"Static_Pressure\": 0 } ]","payloadType":"json","repeat":"","crontab":"","once":false,"x":270,"y":1160,"wires":[["925c9bba.8f9d48"]]},{"id":"ae2ae65a.94de38","type":"debug","z":"462586cc.55d938","name":"","active":true,"console":"false","complete":"false","x":670,"y":1160,"wires":[]}]