Make an ARRAY after a text input node.

Sometimes Node-RED makes it easier for you...

[{"id":"5a193e81.d3d9b8","type":"inject","z":"fde1fdc8.696df","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":140,"wires":[["dfdf77b.4aebe88","2344bf48.e7f348","6c84b3d9.4ee76c","fc97af08.a91658"]]},{"id":"dfdf77b.4aebe88","type":"function","z":"fde1fdc8.696df","name":"Topic 1","func":"msg.topic=\"1\"\nmsg.payload = \"en\"\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":140,"wires":[["f044da86.a607c8"]]},{"id":"2344bf48.e7f348","type":"function","z":"fde1fdc8.696df","name":"Topic 2","func":"msg.topic=\"2\"\nmsg.payload = \"to\"\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":80,"wires":[["f044da86.a607c8"]]},{"id":"6c84b3d9.4ee76c","type":"function","z":"fde1fdc8.696df","name":"Topic 3","func":"msg.topic=\"3\"\nmsg.payload = \"tre\"\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":200,"wires":[["f044da86.a607c8"]]},{"id":"fc97af08.a91658","type":"function","z":"fde1fdc8.696df","name":"Topic 4","func":"msg.topic=\"4\"\nmsg.payload = \"fire\"\nreturn msg;","outputs":1,"noerr":0,"x":280,"y":40,"wires":[["f044da86.a607c8"]]},{"id":"f044da86.a607c8","type":"join","z":"fde1fdc8.696df","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"4","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":460,"y":180,"wires":[["6d23e5fe.225b14"]]},{"id":"bd5419ab.980818","type":"debug","z":"fde1fdc8.696df","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":650,"y":320,"wires":[]},{"id":"6d23e5fe.225b14","type":"change","z":"fde1fdc8.696df","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"payload.value","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":240,"wires":[["bd5419ab.980818"]]}]