Sorry folks, maybe I should know by now, but I seem to be missing something.
This is a BASIC flow.
Walk through:
Signal comes in. It is [] (null). First two nodes.
I show that. First debug node.
I want to change the [] to N/C. Third node.
But the if( ) doesn’t seem to catch it.
[{"id":"f4190b74.98ed7","type":"inject","z":"788d09c7.f35328","name":"","topic":"","payload":"blah","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130,"y":680,"wires":[["a3785f58.e040d"]]},{"id":"a3785f58.e040d","type":"function","z":"788d09c7.f35328","name":"","func":"msg.payload=[];\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":680,"wires":[["6a5d69c0.6589e8","702b7c58.664dec"]]},{"id":"6a5d69c0.6589e8","type":"debug","z":"788d09c7.f35328","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":420,"y":640,"wires":[]},{"id":"702b7c58.664dec","type":"function","z":"788d09c7.f35328","name":"","func":"if (msg.payload == [])\n{\n msg.payload = 'N/C';\n}\nreturn msg;","outputs":1,"noerr":0,"x":430,"y":680,"wires":[["8d132868.2081c8"]]},{"id":"8d132868.2081c8","type":"debug","z":"788d09c7.f35328","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":640,"wires":[]}]
Thanks in advance.