$ 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);
});
``