kaue/jsonexport

Need Help : Complex Json Array to CSV

Zozor54 opened this issue · 2 comments

Hi,

I'm trying to convert a large json array to a CSV.

My json array is provided by a mongodb query.
My code :

const stream = mong.getRandomDataWithLimit(10, count); const output = fs.createWriteStream("./data/export/"+name+".csv") stream.pipe(jsonArrayStreams.stringify()).pipe(output);

My CSV doesn't have any header and start at line 3.
What's is wrong please ?

Mentioning in case it help, an online demo with options you can play with, is here:
https://kaue.github.io/jsonexport/demo/

kaue commented

@Zozor54 It would be better if you could provide a sample json to help us understand whats happening.
If you can, please reopen this issue with some extra information