Need a bit of help
In this example - I'm splitting a msg and doing stuff in a parallel and then I want to recombine.
[{"id":"f14cd0c.f486c3","type":"inject","z":"29e0a8a9.d58188","name":"","topic":"","payload":"3","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":220,"wires":[["53d3335f.af04cc"]]},{"id":"7417b524.f9dabc","type":"change","z":"29e0a8a9.d58188","name":"double","rules":[{"t":"set","p":"payload","pt":"msg","to":"6","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":120,"wires":[["2935e45e.77973c"]]},{"id":"53d3335f.af04cc","type":"function","z":"29e0a8a9.d58188","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"x":355,"y":220,"wires":[["7417b524.f9dabc","cb36ea0b.3fa758","c0ddc6d0.284578"]],"icon":"node-red/arrow-in.svg","l":false},{"id":"cb36ea0b.3fa758","type":"change","z":"29e0a8a9.d58188","name":"square","rules":[{"t":"set","p":"payload","pt":"msg","to":"9","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":530,"y":320,"wires":[["ef6bcef.6a4753"]]},{"id":"9cdb0e8.a21d3f","type":"debug","z":"29e0a8a9.d58188","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1190,"y":220,"wires":[]},{"id":"70806030.761ab","type":"join","z":"29e0a8a9.d58188","name":"","mode":"custom","build":"merged","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1010,"y":220,"wires":[["9cdb0e8.a21d3f"]]},{"id":"2935e45e.77973c","type":"template","z":"29e0a8a9.d58188","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\"double\": \"{{payload}}\"}","output":"json","x":700,"y":120,"wires":[["afead1c6.2ac5c"]]},{"id":"ef6bcef.6a4753","type":"template","z":"29e0a8a9.d58188","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\"square\": \"{{payload}}\"}","output":"json","x":700,"y":320,"wires":[["70806030.761ab"]]},{"id":"afead1c6.2ac5c","type":"delay","z":"29e0a8a9.d58188","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":860,"y":120,"wires":[["70806030.761ab"]]},{"id":"c0ddc6d0.284578","type":"template","z":"29e0a8a9.d58188","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{\"payload\": \"{{payload}}\"}","output":"json","x":700,"y":220,"wires":[["70806030.761ab"]]},{"id":"33b61f01.1928a","type":"comment","z":"29e0a8a9.d58188","name":"Delay just to prove it can handle timing diff","info":"","x":940,"y":60,"wires":[]}]
I actually want the output msg. to be
{
payload : "3",
double : "6",
square : "9"
}
rather than
{
payload : payload : "3"
double : "6",
square : "9"
}
but my brain seems to have stopped working after its initial efforts :).
Also, is there a better way of doing this in the first place?