1const fs = require('fs');
2
3fs.readFile('./customer.json', 'utf8', (err, jsonString) => {
4 if (err) {
5 console.log("File read failed:", err)
6 return
7 }
8 console.log('File data:', jsonString)
9})
1fs.readFile(filePath, function (error, content) {
2 var data = JSON.parse(content);
3 console.log(data.collection.length);
4});
5