Simple JSON input string to LEDs on dash

I've actually discovered an easier way to achieve this ....
using a functions with multiple outputs.
This 'splits out' the incoming JSON strings into separate outputs.

the function is like this:
var r1 = {payload: "P47."+(msg.payload.L_slpk3_dressing)};
var r2 = {payload: "H33."+(msg.payload.L_slpk1_wand)};
var r3 = {payload: "P41."+(msg.payload.L_inkom)};
var r4 = {payload: "P21."+(msg.payload.L_garage)};
var r5 = {payload: "P61."+(msg.payload.L_badkamer_douche)};
var r6 = {payload: "P56."+(msg.payload.L_slpk1_lavabo)};
.......
return [r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24,r25,r26,r27,r28];

and the flow:

[{"id":"84347079.797518","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"79b59fcf.7bd228","type":"udp in","z":"84347079.797518","name":"lighthub","iface":"192.168.1.9","port":"51180","ipv":"udp4","multicast":"true","group":"224.1.1.3","datatype":"utf8","x":70,"y":760,"wires":[["fb0793a0.431018"]]},{"id":"b9d5f979.051098","type":"udp out","z":"84347079.797518","name":"","addr":"224.0.0.1","iface":"eth0","port":"5556","ipv":"udp4","outport":"","base64":false,"multicast":"multi","x":1100,"y":900,"wires":[]},{"id":"e9f7254d.bb5af8","type":"ui_switch","z":"84347079.797518","name":"slpk3_dressing","label":"slpk3_dressing","tooltip":"","group":"b0f2271e.a7b688","order":8,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P47.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P47.0","offvalueType":"str","officon":"","offcolor":"","x":560,"y":60,"wires":[["f4c1a4e0.bb1898"]]},{"id":"f4c1a4e0.bb1898","type":"function","z":"84347079.797518","name":"trim","func":"msg.payload = msg.payload.slice(0,-2);\nreturn msg;","outputs":1,"noerr":0,"x":1050,"y":780,"wires":[["b9d5f979.051098"]]},{"id":"ce270d74.471048","type":"function","z":"84347079.797518","name":"","func":"var r1 = {payload: \"P47.\"+(msg.payload.L_slpk3_dressing)};\nvar r2 = {payload: \"H33.\"+(msg.payload.L_slpk1_wand)};\nvar r3 = {payload: \"P41.\"+(msg.payload.L_inkom)};\nvar r4 = {payload: \"P21.\"+(msg.payload.L_garage)};\nvar r5 = {payload: \"P61.\"+(msg.payload.L_badkamer_douche)};\nvar r6 = {payload: \"P56.\"+(msg.payload.L_slpk1_lavabo)};\nvar r7 = {payload: \"P54.\"+(msg.payload.L_slpk1_dressing)};\nvar r8 = {payload: \"H5.\"+(msg.payload.L_terras)};\nvar r9 = {payload: \"P24.\"+(msg.payload.L_vide)};\nvar r10 = {payload: \"P0.\"+(msg.payload.L_keuken_fornuis)};\nvar r11 = {payload: \"P39.\"+(msg.payload.L_wc_boven)};\nvar r12 = {payload: \"Pxx.\"+(msg.payload.L_tuin)};\nvar r13 = {payload: \"P1.\"+(msg.payload.L_keuken_eiland)};\nvar r14 = {payload: \"P20.\"+(msg.payload.L_voordeur)};\nvar r15 = {payload: \"P34.\"+(msg.payload.L_slpk1_centraal)};\nvar r16 = {payload: \"P62.\"+(msg.payload.L_badkamer_lavabo)};\nvar r17 = {payload: \"P4.\"+(msg.payload.L_keuken_wand)};\nvar r18 = {payload: \"P13.\"+(msg.payload.L_keuken_tafel)};\nvar r19 = {payload: \"P2.\"+(msg.payload.L_berging)};\nvar r20 = {payload: \"P43.\"+(msg.payload.L_buro)};\nvar r21 = {payload: \"P32.\"+(msg.payload.L_balkon)};\nvar r22 = {payload: \"P38.\"+(msg.payload.L_slpk2_centraal)};\nvar r23 = {payload: \"P40.\"+(msg.payload.L_gang)};\nvar r24 = {payload: \"P15.\"+(msg.payload.L_wc_beneden)};\nvar r25 = {payload: \"P6.\"+(msg.payload.L_wasruimte)};\nvar r26 = {payload: \"P37.\"+(msg.payload.L_slpk2_dressing)};\nvar r27 = {payload: \"P49.\"+(msg.payload.L_slpk3_centraal)};\nvar r28 = {payload: \"N70.\"+(msg.payload.L_zijdeur)};\nreturn [r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,r11,r12,r13,r14,r15,r16,r17,r18,r19,r20,r21,r22,r23,r24,r25,r26,r27,r28];\n","outputs":28,"noerr":0,"x":250,"y":860,"wires":[["e9f7254d.bb5af8"],["944a9868.81072"],["85fe4e17.cb3508"],["1dd89db1.ae18ca"],["8c5d83eb.f64c8"],["7b3646a2.dd1b8"],["3e76348.14e0dcc"],["38aada1b.ce7166"],["d8190d98.e9d57"],["afc2bef2.b6c488"],["294b1189.68b54e"],["726f3e71.1fd318"],["7c1abf92.1128c"],["6803f7f0.9d0ee"],["a1f6ae46.cbee8"],["412e93ae.61870c"],["fe92e084.89cf4"],["e9806cfe.273f7"],["ab5797ab.25c8d"],["3ba72542.58241a"],["430b5897.ff6d7"],["e7b9e5a9.8c2448"],["195ff11b.d102ef"],["4b436cbb.e8e2d4"],["ffcb0d06.a137e8"],["d1f2a763.8f37e"],["589120af.2bac88"],["3333ec92.813fc4"]]},{"id":"fb0793a0.431018","type":"json","z":"84347079.797518","name":"","property":"payload","action":"","pretty":false,"x":90,"y":900,"wires":[["ce270d74.471048","ce7ba8ee.744ca"]]},{"id":"944a9868.81072","type":"ui_switch","z":"84347079.797518","name":"slpk1_wand","label":"slpk1_wand","tooltip":"","group":"b0f2271e.a7b688","order":3,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"H33.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"H33.0","offvalueType":"str","officon":"","offcolor":"","x":550,"y":120,"wires":[["f4c1a4e0.bb1898"]]},{"id":"85fe4e17.cb3508","type":"ui_switch","z":"84347079.797518","name":"inkom","label":"inkom","tooltip":"","group":"b8c899b6.e17a4","order":13,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P41.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P41.0","offvalueType":"str","officon":"","offcolor":"","x":530,"y":180,"wires":[["f4c1a4e0.bb1898"]]},{"id":"1dd89db1.ae18ca","type":"ui_switch","z":"84347079.797518","name":"garage","label":"garage","tooltip":"","group":"b8c899b6.e17a4","order":1,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P21.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P21.0","offvalueType":"str","officon":"","offcolor":"","x":540,"y":240,"wires":[["f4c1a4e0.bb1898"]]},{"id":"8c5d83eb.f64c8","type":"ui_switch","z":"84347079.797518","name":"badkamer_douche","label":"badkamer_douche","tooltip":"","group":"b0f2271e.a7b688","order":10,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P61.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P61.0","offvalueType":"str","officon":"","offcolor":"","x":570,"y":300,"wires":[["f4c1a4e0.bb1898"]]},{"id":"7b3646a2.dd1b8","type":"ui_switch","z":"84347079.797518","name":"slpk1_lavabo","label":"slpk1_lavabo","tooltip":"","group":"b0f2271e.a7b688","order":4,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P56.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P56.0","offvalueType":"str","officon":"","offcolor":"","x":550,"y":360,"wires":[["f4c1a4e0.bb1898"]]},{"id":"3e76348.14e0dcc","type":"ui_switch","z":"84347079.797518","name":"slpk1_dressing","label":"slpk1_dressing","tooltip":"","group":"b0f2271e.a7b688","order":2,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P54.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P54.0","offvalueType":"str","officon":"","offcolor":"","x":560,"y":420,"wires":[["f4c1a4e0.bb1898"]]},{"id":"38aada1b.ce7166","type":"ui_switch","z":"84347079.797518","name":"terras","label":"terras","tooltip":"","group":"b8c899b6.e17a4","order":9,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"H5.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"H5.0","offvalueType":"str","officon":"","offcolor":"","x":530,"y":480,"wires":[["f4c1a4e0.bb1898"]]},{"id":"d8190d98.e9d57","type":"ui_switch","z":"84347079.797518","name":"vide","label":"vide","tooltip":"","group":"b8c899b6.e17a4","order":8,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P24.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P24.0","offvalueType":"str","officon":"","offcolor":"","x":530,"y":540,"wires":[["f4c1a4e0.bb1898"]]},{"id":"afc2bef2.b6c488","type":"ui_switch","z":"84347079.797518","name":"keuken_fornuis","label":"keuken_fornuis","tooltip":"","group":"b8c899b6.e17a4","order":3,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P0.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P0.0","offvalueType":"str","officon":"","offcolor":"","x":560,"y":600,"wires":[["f4c1a4e0.bb1898"]]},{"id":"294b1189.68b54e","type":"ui_switch","z":"84347079.797518","name":"wc_boven","label":"wc_boven","tooltip":"","group":"b0f2271e.a7b688","order":11,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P39.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P39.0","offvalueType":"str","officon":"","offcolor":"","x":540,"y":660,"wires":[["f4c1a4e0.bb1898"]]},{"id":"726f3e71.1fd318","type":"ui_switch","z":"84347079.797518","name":"tuin","label":"tuin","tooltip":"","group":"b8c899b6.e17a4","order":10,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"Pxx.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"Pxx.0","offvalueType":"str","officon":"","offcolor":"","x":530,"y":720,"wires":[["f4c1a4e0.bb1898"]]},{"id":"7c1abf92.1128c","type":"ui_switch","z":"84347079.797518","name":"keuken_eiland","label":"keuken_eiland","tooltip":"","group":"b8c899b6.e17a4","order":4,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P1.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P1.0","offvalueType":"str","officon":"","offcolor":"","x":560,"y":780,"wires":[["f4c1a4e0.bb1898"]]},{"id":"6803f7f0.9d0ee","type":"ui_switch","z":"84347079.797518","name":"voordeur","label":"voordeur","tooltip":"","group":"b8c899b6.e17a4","order":11,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P20.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P20.0","offvalueType":"str","officon":"","offcolor":"","x":540,"y":840,"wires":[["f4c1a4e0.bb1898"]]},{"id":"a1f6ae46.cbee8","type":"ui_switch","z":"84347079.797518","name":"slpk1_centraal","label":"slpk1_centraal","tooltip":"","group":"b0f2271e.a7b688","order":1,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P34.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P34.0","offvalueType":"str","officon":"","offcolor":"","x":560,"y":900,"wires":[["f4c1a4e0.bb1898"]]},{"id":"412e93ae.61870c","type":"ui_switch","z":"84347079.797518","name":"badkamer_lavabo","label":"badkamer_lavabo","tooltip":"","group":"b0f2271e.a7b688","order":9,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P62.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P62.0","offvalueType":"str","officon":"","offcolor":"","x":570,"y":960,"wires":[["f4c1a4e0.bb1898"]]},{"id":"fe92e084.89cf4","type":"ui_switch","z":"84347079.797518","name":"keuken_wand","label":"keuken_wand","tooltip":"","group":"b8c899b6.e17a4","order":6,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P4.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P4.0","offvalueType":"str","officon":"","offcolor":"","x":560,"y":1020,"wires":[["f4c1a4e0.bb1898"]]},{"id":"e9806cfe.273f7","type":"ui_switch","z":"84347079.797518","name":"keuken_tafel","label":"keuken_tafel","tooltip":"","group":"b8c899b6.e17a4","order":5,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P13.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P13.0","offvalueType":"str","officon":"","offcolor":"","x":550,"y":1080,"wires":[["f4c1a4e0.bb1898"]]},{"id":"ab5797ab.25c8d","type":"ui_switch","z":"84347079.797518","name":"berging","label":"berging","tooltip":"","group":"b8c899b6.e17a4","order":7,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P2.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P2.0","offvalueType":"str","officon":"","offcolor":"","x":540,"y":1140,"wires":[["f4c1a4e0.bb1898"]]},{"id":"3ba72542.58241a","type":"ui_switch","z":"84347079.797518","name":"buro","label":"buro","tooltip":"","group":"b0f2271e.a7b688","order":12,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P43.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P43.0","offvalueType":"str","officon":"","offcolor":"","x":530,"y":1200,"wires":[["f4c1a4e0.bb1898"]]},{"id":"430b5897.ff6d7","type":"ui_switch","z":"84347079.797518","name":"balkon","label":"balkon","tooltip":"","group":"b0f2271e.a7b688","order":13,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P32.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P32.0","offvalueType":"str","officon":"","offcolor":"","x":530,"y":1260,"wires":[["f4c1a4e0.bb1898"]]},{"id":"e7b9e5a9.8c2448","type":"ui_switch","z":"84347079.797518","name":"slpk2_centraal","label":"slpk2_centraal","tooltip":"","group":"b0f2271e.a7b688","order":5,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P38.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P38.0","offvalueType":"str","officon":"","offcolor":"","x":560,"y":1320,"wires":[["f4c1a4e0.bb1898"]]},{"id":"195ff11b.d102ef","type":"ui_switch","z":"84347079.797518","name":"gang","label":"gang","tooltip":"","group":"b0f2271e.a7b688","order":14,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P40.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P40.0","offvalueType":"str","officon":"","offcolor":"","x":530,"y":1380,"wires":[["f4c1a4e0.bb1898"]]},{"id":"4b436cbb.e8e2d4","type":"ui_switch","z":"84347079.797518","name":"wc_beneden","label":"wc_beneden","tooltip":"","group":"b8c899b6.e17a4","order":12,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P15.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P15.0","offvalueType":"str","officon":"","offcolor":"","x":550,"y":1440,"wires":[["f4c1a4e0.bb1898"]]},{"id":"ce7ba8ee.744ca","type":"debug","z":"84347079.797518","name":"lighthub","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":100,"y":1020,"wires":[]},{"id":"ffcb0d06.a137e8","type":"ui_switch","z":"84347079.797518","name":"wasruimte","label":"wasruimte","tooltip":"","group":"b8c899b6.e17a4","order":2,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P6.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P6.0","offvalueType":"str","officon":"","offcolor":"","x":540,"y":1500,"wires":[["f4c1a4e0.bb1898"]]},{"id":"d1f2a763.8f37e","type":"ui_switch","z":"84347079.797518","name":"slpk2_dressing","label":"slpk2_dressing","tooltip":"","group":"b0f2271e.a7b688","order":6,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P37.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P37.0","offvalueType":"str","officon":"","offcolor":"","x":560,"y":1560,"wires":[["f4c1a4e0.bb1898"]]},{"id":"589120af.2bac88","type":"ui_switch","z":"84347079.797518","name":"slpk3_centraal","label":"slpk3_centraal","tooltip":"","group":"b0f2271e.a7b688","order":7,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"P49.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"P49.0","offvalueType":"str","officon":"","offcolor":"","x":560,"y":1620,"wires":[["f4c1a4e0.bb1898"]]},{"id":"3333ec92.813fc4","type":"ui_switch","z":"84347079.797518","name":"zijdeur","label":"zijdeur","tooltip":"","group":"b8c899b6.e17a4","order":15,"width":0,"height":0,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"N70.1","onvalueType":"str","onicon":"","oncolor":"","offvalue":"N70.0","offvalueType":"str","officon":"","offcolor":"","x":530,"y":1680,"wires":[["f4c1a4e0.bb1898"]]},{"id":"130ba99e.809b66","type":"ui_button","z":"84347079.797518","name":"all_off","group":"3ff9c068.24f268","order":0,"width":0,"height":0,"passthru":false,"label":"all off","tooltip":"","color":"","bgcolor":"","icon":"","payload":"H20","payloadType":"str","topic":"","x":950,"y":1100,"wires":[["b9d5f979.051098"]]},{"id":"b0f2271e.a7b688","type":"ui_group","z":"","name":"boven","tab":"1edf33c5.a44e14","order":2,"disp":true,"width":"6","collapse":false},{"id":"b8c899b6.e17a4","type":"ui_group","z":"","name":"beneden","tab":"1edf33c5.a44e14","order":1,"disp":true,"width":"6","collapse":false},{"id":"3ff9c068.24f268","type":"ui_group","z":"","name":"functies","tab":"1edf33c5.a44e14","disp":true,"width":"6","collapse":false},{"id":"1edf33c5.a44e14","type":"ui_tab","z":"","name":"verlichting","icon":"dashboard","disabled":false,"hidden":false}]

inspired by this post " Using switch node to show actual state "