Giter Site home page Giter Site logo

rfb-dynamic-csv-to-json's Introduction

Dynamic CSV transformation into JSON

Parse CSV into a JSON file based on CSV column names, making easy to add new JSON properties from a CSV file data source.

Starting point

CSV file

files/MarketAvrgTicketSample.csv

Desired JSON file

files/MarketAvrgTicketSample.json

Process

The aim of this script is to build dynamically a JSON file starting from a CSV file, following the rules below.

Notice there are different column types:

  1. Column name where no underscore in it; indicates nesting is opened, so this there is no data for this column at the CSV. (i.e. MarketsList)
  2. Column name where no underscore in it and there is data int this column at the CSV file; indicates it is a first level property. (i.e. schemaVersion)
  3. Column name contains underscore; that identifies from left side the origin and from right side the destiny. In addition, when a column appears with no data at the CSV file, indicates new nest opening, otherwise finding data in this column indicates it is a JSON propertie itself. (i.e. MarketsList_Market and Market_isoCod)

rfb-dynamic-csv-to-json's People

Contributors

rubenbmxxx avatar

Watchers

 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.