var msg2 = [{payload:"",filename:""}];
msg2.filename = "test";
msg2.payload = "test2";
msg.payload = "test3";
return [msg,msg2];
Though I fill msg2.filename and msg2.payload with data, the second debug output shows only the empty strings from line 1!??
complete flow to test:
[
{
"id": "e82841526f31da38",
"type": "function",
"z": "ada67f26f66765ce",
"name": "",
"func": "var msg2 = [{payload:\"\",filename:\"\"}];\n\nmsg2.filename = \"test\";\nmsg2.payload = \"test2\";\n\nmsg.payload = \"test3\";\n\nreturn [msg,msg2];\n",
"outputs": 2,
"timeout": 0,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 420,
"y": 200,
"wires": [
[
"5240e61ec7f320bf"
],
[
"ae5614bcead71a36"
]
]
},
{
"id": "875462fc390b6934",
"type": "inject",
"z": "ada67f26f66765ce",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 220,
"y": 200,
"wires": [
[
"e82841526f31da38"
]
]
},
{
"id": "5240e61ec7f320bf",
"type": "debug",
"z": "ada67f26f66765ce",
"name": "debug 35",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 620,
"y": 160,
"wires": []
},
{
"id": "ae5614bcead71a36",
"type": "debug",
"z": "ada67f26f66765ce",
"name": "debug 36",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 620,
"y": 240,
"wires": []
}
]