2 example flows in 1:
[{"id":"39f2942b.6e0054","type":"inject","z":"ac3a9890.7ebed","name":"","topic":"","payload":"{\"speed\":100,\"switch\":true,\"color\":{\"r\":255,\"g\":255,\"b\":255}}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":458,"y":528,"wires":[["e88c6dd9.ad2dd","b287ddc8.5a86d8"]]},{"id":"e88c6dd9.ad2dd","type":"function","z":"ac3a9890.7ebed","name":"","func":"m = msg.payload\n\nspeed = {payload:m.speed}\nsw = {payload:m.switch}\ncolor = {payload:m.color}\n\nreturn [speed,sw,color]","outputs":3,"noerr":0,"x":626,"y":600,"wires":[["8fcc88db.bd968"],["5cc4bfc4.cc903"],["c0e85942.2a48e"]]},{"id":"b287ddc8.5a86d8","type":"switch","z":"ac3a9890.7ebed","name":"","property":"payload","propertyType":"msg","rules":[{"t":"hask","v":"speed","vt":"str"},{"t":"hask","v":"switch","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":626,"y":456,"wires":[["e0230e77.2efa6"],["1a300a87.85e855"]]},{"id":"8fcc88db.bd968","type":"debug","z":"ac3a9890.7ebed","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":814,"y":552,"wires":[]},{"id":"5cc4bfc4.cc903","type":"debug","z":"ac3a9890.7ebed","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":814,"y":600,"wires":[]},{"id":"c0e85942.2a48e","type":"debug","z":"ac3a9890.7ebed","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":814,"y":648,"wires":[]},{"id":"e0230e77.2efa6","type":"change","z":"ac3a9890.7ebed","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.speed","tot":"msg"},{"t":"delete","p":"payload.switch","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":432,"wires":[["247d4b6b.bb9ac4"]]},{"id":"1a300a87.85e855","type":"change","z":"ac3a9890.7ebed","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.switch","tot":"msg"},{"t":"delete","p":"payload.speed","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":800,"y":480,"wires":[["99a9d3ed.38ad08"]]},{"id":"247d4b6b.bb9ac4","type":"debug","z":"ac3a9890.7ebed","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":982,"y":432,"wires":[]},{"id":"99a9d3ed.38ad08","type":"debug","z":"ac3a9890.7ebed","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":982,"y":480,"wires":[]}]