mongotojson

1.0.3 • Public • Published

Export the mongodb collection to csv or json

Usage

 $ npm install mongotojson --save
var convert = require('mongotojson');
var options = {
	database: 'product', // required
	collection: 'users', // required
	fields: ['name','address'], // optional
	output: './output/users.csv or .json', // required
};
convert.export(options, function (err, success) {
	console.log(err);
	console.log(success);
});
``

/mongotojson/

    Package Sidebar

    Install

    npm i mongotojson

    Weekly Downloads

    1

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    16.8 kB

    Total Files

    7

    Last publish

    Collaborators

    • neelstephen