CSV skips boolean false values

I am using the CSV node to convert a JSON object containing an array to CSV. However, when the array contains boolean values (false, true), the node's output skips the false values.
This is my test flow `

[{"id":"d5dfd68d.60a738","type":"inject","z":"b77ebf57.35da3","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[false, true]","payloadType":"json","x":440,"y":400,"wires":[["3a96fa3c.76c796"]]},{"id":"3a96fa3c.76c796","type":"csv","z":"b77ebf57.35da3","name":"","sep":",","hdrin":"","hdrout":"none","multi":"one","ret":"\\r\\n","temp":"","skip":"0","strings":false,"include_empty_strings":true,"include_null_values":true,"x":630,"y":400,"wires":[["bdf2fef6.2c008"]]},{"id":"bdf2fef6.2c008","type":"debug","z":"b77ebf57.35da3","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":810,"y":400,"wires":[]}]

I just get ,true as the output when I expect it to be false,true
What an I doing wrong? I tried to toggle the node formatting options (empty strings, null values), but it does not make a difference.

As a workaround, I converted the bool array to a string one using a function (.toString().split(",")).
The CSV output looks ok now, but the CSV node should handle boolean array values natively.

Hi, can you please raise it as an issue on github along with your example so we can track the fix. Thanks

Now fixed in master

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.