Hello everyone,
i would like to compare an array, when its 1,1 its should give 1 as output and when its 0,0 it should give a 0. Every other combination should give an error message.
i tried this as you can see bellow but it doesnt work ... can someone help pls?
[{"id":"849ba83b943e3dea","type":"debug","z":"2ecd18bc023a4c74","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1710,"y":600,"wires":[]},{"id":"093db9db80f0ac06","type":"function","z":"2ecd18bc023a4c74","name":"","func":"//Waarden toekennen\nStatus= msg.payload\n\n\n//Bewerkingen doen met waarden.\nif (Status === [0,0]) {\n Status =0;\n Statusbericht=\"\"\n}\n \nelse if (Status === [1,1]) {\n Status =1;\n Statusbericht=\"\"\n}\n \nelse {\nStatusbericht =\"Er is een technische fout opgetreden!\";\nStatus= \"\";\n}\n\n//Weergeven in console\nvar msg1 = {payload:Status}\nvar msg2 = {payload:Statusbericht}\nreturn [msg1,msg2];","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1540,"y":620,"wires":[["849ba83b943e3dea"],["e40a0efd73d202c1"]]},{"id":"e40a0efd73d202c1","type":"debug","z":"2ecd18bc023a4c74","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1710,"y":640,"wires":[]}]