Skip to content

Commit b689317

Browse files
committed
fix: make it clearer in saving data that we append more code
1 parent 6f70637 commit b689317

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sources/academy/webscraping/scraping_basics_javascript2/08_saving_data.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ import { AsyncParser } from '@json2csv/node';
168168
Then, let's add one more data export near the end of the source code of our scraper:
169169

170170
```js
171+
const jsonData = JSON.stringify(data);
172+
await writeFile('products.json', jsonData);
173+
171174
const parser = new AsyncParser();
172175
const csvData = await parser.parse(data).promise();
173176
await writeFile("products.csv", csvData);

0 commit comments

Comments
 (0)