arquivo json para objeto JS
var data = JSON.parse(fs.readFileSync(filePath));
Worried Wasp
var data = JSON.parse(fs.readFileSync(filePath));
fs.readFile(filePath, function (error, content) {
var data = JSON.parse(content);
console.log(data.collection.length);
});