This is the funktion where the output looks "twisted" does not work.
[{"id":"db1c3b14.877d98","type":"function","z":"88aeead.6736f18","name":"","func":"var msg1 =[];\nvar msg2 =[];\n\nif (msg.payload[0].MO ==\"1\"){\n MO=\"on\";\n }\n else{\n MO=\"off\";\n }\nif (msg.payload[0].DI ==\"1\"){\n DI=\"on\";\n }\n else{\n DI=\"off\";\n }\nif (msg.payload[0].MI ===\"1\"){\n MI=\"on\";\n }\n else{\n MI=\"off\";\n } \nif (msg.payload[0].DO ===\"1\"){\n DO=\"on\";\n }\n else{\n DO=\"off\";\n } \nif (msg.payload[0].FR ===\"1\"){\n FR=\"on\";\n }\n else{\n FR=\"off\";\n } \nif (msg.payload[0].SO ===\"1\"){\n SO=\"on\";\n }\n else{\n SO=\"off\";\n } \n if (msg.payload[0].SA ===\"1\"){\n SA=\"on\";\n }\n else{\n SA=\"off\";\n } \n\nvar SRoff={\"SRoff\":msg.payload[0].SRoff};\nvar SRon={\"SRon\":msg.payload[0].SRon};\nvar SSoff={\"SSoff\":msg.payload[0].SSoff};\nvar SSon={\"SSon\":msg.payload[0].SSon};\nvar Toff={\"Toff\":msg.payload[0].Toff};\nvar Ton={\"Ton\":msg.payload[0].Ton};\nvar ZToff={\"ZToff\":msg.payload[0].ZToff};\nvar ZTon={\"ZTon\":msg.payload[0].ZTon};\nvar Z_Toff={\"Z_Toff\":msg.payload[0].Z_Toff};\nvar Z_Ton={\"Z_Ton\":msg.payload[0].Z_Ton};\nvar Ausgang={\"Ausgang\":msg.payload[0].Ausgang};\nvar Auto={\"Auto\":msg.payload[0].Auto};\nmsg2.push(MO,DI,MI,DO,FR,SA,SO,SRoff,SRon,SSoff,SSon,Toff,Ton,ZToff,ZTon,Z_Toff,Z_Ton,Ausgang,Auto);\nmsg.payload=msg2;\nfor(var a in msg.payload){\nmsg1.push([{\"payload\":msg.payload[a]}]) \nmsg1.topic=\"\";\n \n}\n\n\nreturn msg1;\n\n","outputs":19,"noerr":0,"initialize":"","finalize":"","x":550,"y":1660,"wires":[["a0195dd6.060d4"],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]}]
and I read and inkjeted from an existing Maria DB to function (no chance to do changes at DB, written by different program )
topic: "SELECT * FROM Timer1 ORDER BY TIMESTAMP DESC LIMIT 1" 5.11.2020, 20:22:15node: bd410f46.2525dSELECT * FROM Timer1 ORDER BY TIMESTAMP DESC LIMIT 1 : msg : Object
object
_msgid: "54726b25.34f1b4"
payload: array[1]
0: object
TIMESTAMP: "2020-11-04T16:23:11.000Z"
MO: 1
DI: 1
MI: 0
DO: 1
FR: 0
SA: 1
SO: 0
SRoff: 0
SRon: 0
SSoff: 1
SSon: 1
Toff: 0
Ton: 0
Auto: 1
Ausgang: 0
ZToff: "1604271600000"
ZTon: "0"
Z_Toff: "18:00"
Z_Ton: "08:00"
topic: "SELECT * FROM Timer1 ORDER BY TIMESTAMP DESC LIMIT 1"