fs.readFile(jsonString[x], 'latin1', function(err, data) { if (err) { return console.log(err); } return data; }); code example
Example: fs readfile not working
const content = fs.readFileSync('./Index.html', 'utf8');
console.log(content);
const content = fs.readFileSync('./Index.html', 'utf8');
console.log(content);