Without a function node...
[{"id":"82ad0f7b4eefceec","type":"inject","z":"85e1791bc0cd6285","name":"4 properties","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"VALUE1\": 1, \"VALUE2\":2,\"VALUE3\":3, \"VALUE4\":4}","payloadType":"json","x":1306,"y":704,"wires":[["a395f9dbf3dc84a7"]]},{"id":"a395f9dbf3dc84a7","type":"split","z":"85e1791bc0cd6285","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"topic","x":1458,"y":704,"wires":[["7fd363da1faaeae7"]]},{"id":"7fd363da1faaeae7","type":"switch","z":"85e1791bc0cd6285","name":"route by topic","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"VALUE1","vt":"str"},{"t":"eq","v":"VALUE2","vt":"str"},{"t":"eq","v":"VALUE3","vt":"str"},{"t":"eq","v":"VALUE4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1456,"y":800,"wires":[["e0d28738aa145d72"],["30985bacbb74e0fb"],["15a51cc054d8d9a2"],["38bda349fcbbba6a"]]},{"id":"e0d28738aa145d72","type":"debug","z":"85e1791bc0cd6285","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1648,"y":768,"wires":[]},{"id":"30985bacbb74e0fb","type":"debug","z":"85e1791bc0cd6285","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1648,"y":800,"wires":[]},{"id":"15a51cc054d8d9a2","type":"debug","z":"85e1791bc0cd6285","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1648,"y":832,"wires":[]},{"id":"38bda349fcbbba6a","type":"debug","z":"85e1791bc0cd6285","name":"debug 4","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1648,"y":864,"wires":[]}]
NOTE (just in case you overlooked this)
many people split a msg
into to multiple outputs when really all they need to do is use the relevant property (e.g msg.payload.VALUE1
) in then next node. for example...