jb55-json-table
v1.0.0
Published
like zeMirco/json2csv but supports nested fields and arrays
Downloads
3
Readme
json-table
Convert a stream of json objects to csv
Will guess field names from the first object, or you can specify them manually.
Field names are dot-lenses generated by tableize-array
Installation
Install with npm
$ npm install jb55/json-table
$ npm install jb55-json-table
Examples
$ json-table package.json
"name","description","keywords.0","keywords.1","keywords.2","version","repository.type","repository.url","main","scripts.test","bin.json-table","bin.json-fields","dependencies.JSONStream","dependencies.csv","dependencies.debug","dependencies.dot-lens","dependencies.epipebomb","dependencies.join-stream","dependencies.minimist","dependencies.tableize-array","dependencies.through","devDependencies.expect\.js","devDependencies.from","devDependencies.mocha"
"json-table","tableize json","csv","table","json2csv","0.0.1","git","git://github.com/jb55/json-table.git","index.js","mocha --harmony --reporter spec","./bin/json-table","./bin/json-fields","^0.7.3","git://github.com/segmentio/csv","^0.8.1","1.1.1","^0.1.1","0.0.0","0.0.8","^1.1.0","^2.3.4","*","^0.1.3","*"
Making sure all fields are covered
$ mongoexport -c users > users.json
$ <users.json json-table -f `json-fields users.json`
License
The MIT License (MIT)
Copyright (c) 2014 William Casarin
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.