I know it can be done in other languages like Powershell, I did a lot of searching but couldn't find any how it can be done in node.js or javascript.
For example let's say I have:
carModel,price,color
"Audi",10000,"blue"
"BMW",15000,"red"
"Mercedes",20000,"yellow"
"Porsche",30000,"green"
and I want to append to line 3 something like:
carModel,price,color,errorcode,errormsg
"Audi",10000,"blue"
"BMW",15000,"red","05","wrong price"
"Mercedes",20000,"yellow"
"Porsche",30000,"green"
My question isn't really about how to solve the above, but:
Is there any way to manipulate a csv file in js directly without converting it to json objects and converting it back to csv?