Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const csv = require('csv-parser');
- const fs = require('fs');
- const weshareJson = require('./weshare.json');
- let wegather = [];
- let weshare = [];
- let missing = [];
- fs.createReadStream('wegather.csv')
- .pipe(csv())
- .on('data', (row) => {
- wegather.push(row['WeShare Payment ID']);
- })
- .on('end', () => {
- weshare = weshareJson.map((row) => {
- return row.transactionId;
- });
- weshare.forEach((row) => {
- if (!wegather.includes(row)) {
- console.log(row);
- }
- });
- console.log(weshare.length);
- console.log(wegather.length);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement