I have a node application which can end up with a CSV formatted table in a variable.
I’d like to parse it into a JSON style format.
All of the modules I’ve looked at seem to only take input from files (unless I’m misunderstanding)
Are there any modules out there which do what I’d like or would I be better off just rolling my own solution?
Thanks!
This example from NodeCSV seems to be parsing from a variable:
https://github.com/wdavidw/node-csv-parser
In general, Node.js lets you treat both files and strings as streams. It’s usually pretty trivial to go from one to the other.