Hi,
I debugged the function node like you said and tried to adjust the template node. However the template node does node take the variable values. I still don't get the syntax in the tamplete node. Maybe you can help me out there? Thank you!
[
{
"id": "f9a18460.8648b8",
"type": "inject",
"z": "c8557530.baa8f8",
"name": "Go",
"topic": "",
"payload": "1",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "",
"x": 250,
"y": 320,
"wires": [
[
"bdb4934b.ae565"
]
]
},
{
"id": "95c036b9.7854a8",
"type": "debug",
"z": "c8557530.baa8f8",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 830,
"y": 320,
"wires": []
},
{
"id": "4084d532.e203cc",
"type": "template",
"z": "c8557530.baa8f8",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<table id=\"table\" border=\"1\">\n <tr>\n <th ng-repeat=\"row in msg.payload.weather.date\">{{payload.weather.date}}</th> \n </tr>\n <tbody>\n <tr>\n <td ng-repeat=\"msg.payload.weather.time in row\" >{{payload.weather.time}}</td>\n </tr>\n <tr>\n <td ng-repeat=\"msg.payload.weather.time in row\" >{{payload.weather.windspeed}}</td>\n </tr>\n </tbody>\n</table>",
"output": "str",
"x": 660,
"y": 320,
"wires": [
[
"95c036b9.7854a8"
]
]
},
{
"id": "bdb4934b.ae565",
"type": "function",
"z": "c8557530.baa8f8",
"name": "build array",
"func": "var arr ={\n \"weather\":[{\"timestamp\":1542898800000,\"windspeed\":1.21,\"date\":\"22.11.2018\",\"time\":\"16:00\"},{\"timestamp\":1542909600000,\"windspeed\":1.16,\"date\":\"22.11.2018\",\"time\":\"19:00\"},{\"timestamp\":1542920400000,\"windspeed\":1.11,\"date\":\"22.11.2018\",\"time\":\"22:00\"},{\"timestamp\":1542931200000,\"windspeed\":1.07,\"date\":\"23.11.2018\",\"time\":\"01:00\"},{\"timestamp\":1542942000000,\"windspeed\":1.07,\"date\":\"23.11.2018\",\"time\":\"04:00\"},{\"timestamp\":1542952800000,\"windspeed\":1.16,\"date\":\"23.11.2018\",\"time\":\"07:00\"},{\"timestamp\":1542963600000,\"windspeed\":2.06,\"date\":\"23.11.2018\",\"time\":\"10:00\"},{\"timestamp\":1542974400000,\"windspeed\":2.96,\"date\":\"23.11.2018\",\"time\":\"13:00\"},{\"timestamp\":1542985200000,\"windspeed\":3.23,\"date\":\"23.11.2018\",\"time\":\"16:00\"},{\"timestamp\":1542996000000,\"windspeed\":3.57,\"date\":\"23.11.2018\",\"time\":\"19:00\"},{\"timestamp\":1543006800000,\"windspeed\":3.72,\"date\":\"23.11.2018\",\"time\":\"22:00\"},{\"timestamp\":1543017600000,\"windspeed\":3.41,\"date\":\"24.11.2018\",\"time\":\"01:00\"},{\"timestamp\":1543028400000,\"windspeed\":1.86,\"date\":\"24.11.2018\",\"time\":\"04:00\"},{\"timestamp\":1543039200000,\"windspeed\":1.2,\"date\":\"24.11.2018\",\"time\":\"07:00\"},{\"timestamp\":1543050000000,\"windspeed\":1.76,\"date\":\"24.11.2018\",\"time\":\"10:00\"},{\"timestamp\":1543060800000,\"windspeed\":1.86,\"date\":\"24.11.2018\",\"time\":\"13:00\"},{\"timestamp\":1543071600000,\"windspeed\":1.3,\"date\":\"24.11.2018\",\"time\":\"16:00\"},{\"timestamp\":1543082400000,\"windspeed\":1.2,\"date\":\"24.11.2018\",\"time\":\"19:00\"},{\"timestamp\":1543093200000,\"windspeed\":1.14,\"date\":\"24.11.2018\",\"time\":\"22:00\"},{\"timestamp\":1543104000000,\"windspeed\":1.13,\"date\":\"25.11.2018\",\"time\":\"01:00\"},{\"timestamp\":1543114800000,\"windspeed\":1.16,\"date\":\"25.11.2018\",\"time\":\"04:00\"},{\"timestamp\":1543125600000,\"windspeed\":1.17,\"date\":\"25.11.2018\",\"time\":\"07:00\"},{\"timestamp\":1543136400000,\"windspeed\":1.68,\"date\":\"25.11.2018\",\"time\":\"10:00\"},{\"timestamp\":1543147200000,\"windspeed\":1.78,\"date\":\"25.11.2018\",\"time\":\"13:00\"},{\"timestamp\":1543158000000,\"windspeed\":2.81,\"date\":\"25.11.2018\",\"time\":\"16:00\"},{\"timestamp\":1543168800000,\"windspeed\":3.01,\"date\":\"25.11.2018\",\"time\":\"19:00\"},{\"timestamp\":1543179600000,\"windspeed\":2.56,\"date\":\"25.11.2018\",\"time\":\"22:00\"},{\"timestamp\":1543190400000,\"windspeed\":1.28,\"date\":\"26.11.2018\",\"time\":\"01:00\"},{\"timestamp\":1543201200000,\"windspeed\":0.93,\"date\":\"26.11.2018\",\"time\":\"04:00\"},{\"timestamp\":1543212000000,\"windspeed\":1.26,\"date\":\"26.11.2018\",\"time\":\"07:00\"},{\"timestamp\":1543222800000,\"windspeed\":2.58,\"date\":\"26.11.2018\",\"time\":\"10:00\"},{\"timestamp\":1543233600000,\"windspeed\":4.35,\"date\":\"26.11.2018\",\"time\":\"13:00\"},{\"timestamp\":1543244400000,\"windspeed\":4.83,\"date\":\"26.11.2018\",\"time\":\"16:00\"},{\"timestamp\":1543255200000,\"windspeed\":4.66,\"date\":\"26.11.2018\",\"time\":\"19:00\"},{\"timestamp\":1543266000000,\"windspeed\":4.26,\"date\":\"26.11.2018\",\"time\":\"22:00\"},{\"timestamp\":1543276800000,\"windspeed\":4.37,\"date\":\"27.11.2018\",\"time\":\"01:00\"},{\"timestamp\":1543287600000,\"windspeed\":4.71,\"date\":\"27.11.2018\",\"time\":\"04:00\"},{\"timestamp\":1543298400000,\"windspeed\":4.87,\"date\":\"27.11.2018\",\"time\":\"07:00\"},{\"timestamp\":1543309200000,\"windspeed\":5.26,\"date\":\"27.11.2018\",\"time\":\"10:00\"},{\"timestamp\":1543320000000,\"windspeed\":5.43,\"date\":\"27.11.2018\",\"time\":\"13:00\"}]\n \n \n};\n\nmsg.payload = arr;\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 450,
"y": 320,
"wires": [
[
"4084d532.e203cc",
"c9ad3c38.f6a3b"
]
]
},
{
"id": "c9ad3c38.f6a3b",
"type": "debug",
"z": "c8557530.baa8f8",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"x": 660,
"y": 220,
"wires": []
}
]