Giter Site home page Giter Site logo

json2csv's Introduction

convert JSON to CSV

Surely a reinvention or unvention, but I need it

Pass in JSON, get back CSV

If you have a list of things in JSON, then you get back a list of those things, CSV-ified.

Below the first level of list, everything else is flattened out.

Using the mighty power of wings to get to your pain at supersonic speeds.

formally link headers for printing and extracted headers

In my prior effort, I had a look up table so that I could get the record and print a human-readable header name for that column. Now it is important because I sort the records alphabetically to make sure they line up, and sometimes you might even have a record with null instead of an actual value if you're pulling from lots of records from say different files.

So I need a way to specify the headers, both the printed ones and the embedded ones for extracting. and link the two.

Once possibly useful thing is to just dump the headers to a file, with the structure built such that the developer can enter in override names.

headers = [{order:0, key:bar.baz.foo, header:'Foo'},
           {order:1, key:bat.baz.foo},
           {order:2, key:glr.baz.foo, skip:true},
           {order:3, key:glm.baz.foo, header:'Glum'}
]

So the initial header would get dumped with just the order and the key fields filled out, and then a line break.

The top of the file has instructions for adding header row overrides, and the ability to skip an entry.

Note that this isn't actually used yet.

json2csv's People

Contributors

jmarca avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.