Convert JSON to CSV using Node.js and JavaScript

Sdílet
Vložit
  • čas přidán 4. 09. 2024
  • In this video, I show you how to use Node.js and Javascript with the csv-writer library to convert an array from a JSON document to a CSV file which can be opened in Excel, another spreadsheet program or imported in R or Python.
    The csv-writer library is available on npm, with documentation and details available here: www.npmjs.com/...

Komentáře • 13

  • @TheAces1979
    @TheAces1979 Před rokem

    Thank you!

  • @CodeTravel
    @CodeTravel Před 2 lety +1

    just in time. thanks.

  • @alefoliveira1984
    @alefoliveira1984 Před 2 lety

    Awesome !!!

  • @fritzgerlin7884
    @fritzgerlin7884 Před 2 lety

    How can we do it with import ? By example
    const createCsvWriter=require('csv-writer').createObjectCsvWriter;

  • @DigsWigs2022
    @DigsWigs2022 Před rokem

    Thank you.

  • @ferleniz268
    @ferleniz268 Před 2 lety

    Excellent! do you know updated a csv file to S3 from Amazon web service ?? thanks

  • @Yojoso123
    @Yojoso123 Před rokem

    awesome tutorial! what if I have a data in an array of objects - the csv writes [object Object] - how can I solve this? i want either for each object, to create a new row, or just show all objects in one row

    • @syntaxbyte
      @syntaxbyte  Před rokem

      Make sure the header variable is set correctly to pull the variables that you want.

  • @synologictips2451
    @synologictips2451 Před 2 lety

    Let say u have 20 json files and same structur, how to convert it? Ur path just 1 files

    • @syntaxbyte
      @syntaxbyte  Před 2 lety

      You would just create a loop to loop through all the documents.

    • @synologictips2451
      @synologictips2451 Před 2 lety

      @@syntaxbyte u got article about looping that u mean?

    • @syntaxbyte
      @syntaxbyte  Před 2 lety +1

      @@synologictips2451 stackoverflow.com/questions/32511789/looping-through-files-in-a-folder-node-js

  • @siddharthppawar
    @siddharthppawar Před 2 lety

    Can't see