Using version : "objects-to-csv": "^1.3.6",
During a bulk upload/writing a CSV file,
noticed a column shift due to a few undefined values in the array of objects.
On writing a file with one set of data at a time, noticed that the column itself is not created if the value of the object's key for that column is 'undefined'.
Handled that at the array level,
Should be some kind of pointer or value to be passed as 'undefined string'.
Since in some cases it's not traceable which values can be undefined for example in scraped data set of a web site.