DEV Community

Discussion on: Save to csv. Jordan Teaches Web Scraping

Collapse
 
evanplaice profile image
Evan Plaice • Edited

FYI, if you want a more direct path to CSV. Dump the values into a 2D array. Then you can use any CSV formatter to produce the CSV.

Ex With csv-es

import CSV from 'csv-es';

const csv = CSV.stringify(array);

Disclaimer: I'm the author of both jquery-csv and just recently csv-es

Collapse
 
aarmora profile image
Jordan Hansen

Cool man, thanks for the suggestion!