How do I use csvtojson with Quasar?
-
https://www.npmjs.com/package/csvtojson
I’m confused on how to npm install csvtojson with my quasar app. My end goal is import a csv file then load the data using a quasar table. Thanks for the help!
-
@fakedrpanda - You’d need an API (NodeJS Server) that uses that package to read the file locally (on the server) and would send the data to your application. Your application would use Axios to read the API (call it from the server).
Scott
-
The package also works on the client:
csvtojson module is a comprehensive nodejs csv parser to convert csv to json or column arrays. It can be used as node.js library / command line tool / or in browser.
-
Oops. I didn’t go further than “csvtojson module is a comprehensive nodejs csv parser”. NodeJS was what caught my eye.
So, you can also just import it into the component where you need it.
Scott
-
@s-molinari Makes sense. Thank you!