$ touch /usr/share/applications/robomongo.desktop
$ vim /usr/share/applications/robomongo.desktop
//function to print CSV from an array for robomongo | |
//place this in .robomongorc.js which should be present in your home directory | |
//inspired by https://github.com/Studio3T/robomongo/wiki/How-to-export-to-CSV | |
function toCSV(array) { | |
let deliminator = ','; | |
let textQualifier = '\"'; | |
let headers = []; | |
var data = {}; | |
var count = -1; |
var outputLocation = require('path').resolve(__dirname, 'file.json'); | |
require('fs').writeFile(outputLocation, JSON.stringify(data, null, 4), function(err) { | |
if(err) { | |
console.log(err); | |
} else { | |
console.log("JSON saved to "+outputLocation); | |
} | |
}); |