If you use it correctly it will work
see this example
[{"id":"d949b60aacba0c90","type":"inject","z":"b9860b4b9de8c8da","name":"array length 0","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[]","payloadType":"jsonata","x":330,"y":140,"wires":[["ee9b01abf97044ae","837e4484190e5395"]]},{"id":"ee9b01abf97044ae","type":"debug","z":"b9860b4b9de8c8da","name":"debug 338","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":450,"y":80,"wires":[]},{"id":"837e4484190e5395","type":"function","z":"b9860b4b9de8c8da","name":"function 21","func":"if(msg.payload.length === 0){\n msg.payload =\"length 0\";\n}else{\n msg.payload =\"length 1\";\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":140,"wires":[["9d0d9f4b63e71d9b"]]},{"id":"12a8804aedf9931f","type":"inject","z":"b9860b4b9de8c8da","name":"array legth 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"test\":1}]","payloadType":"jsonata","x":330,"y":180,"wires":[["ee9b01abf97044ae","837e4484190e5395"]]},{"id":"9d0d9f4b63e71d9b","type":"debug","z":"b9860b4b9de8c8da","name":"debug 339","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":80,"wires":[]}]
Or to do nothing when array length is 1
[{"id":"d949b60aacba0c90","type":"inject","z":"b9860b4b9de8c8da","name":"array length 0","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[]","payloadType":"jsonata","x":330,"y":140,"wires":[["ee9b01abf97044ae","837e4484190e5395"]]},{"id":"ee9b01abf97044ae","type":"debug","z":"b9860b4b9de8c8da","name":"debug 338","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":450,"y":80,"wires":[]},{"id":"837e4484190e5395","type":"function","z":"b9860b4b9de8c8da","name":"function 21","func":"if(msg.payload.length === 0){\n msg.payload =\"length 0\";\n}else{\n msg = null;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":140,"wires":[["9d0d9f4b63e71d9b"]]},{"id":"12a8804aedf9931f","type":"inject","z":"b9860b4b9de8c8da","name":"array legth 1","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[{\"test\":1}]","payloadType":"jsonata","x":330,"y":180,"wires":[["ee9b01abf97044ae","837e4484190e5395"]]},{"id":"9d0d9f4b63e71d9b","type":"debug","z":"b9860b4b9de8c8da","name":"debug 339","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":80,"wires":[]}]
How to import/export a flow
If you require more help please supply a test flow like i have that show the issue you are getting.