how to search for a certain string from a text file node js code example
Example: search string in file node
fs.readFile(FILE_LOCATION, function (err, data) {
if (err) throw err;
if(data.includes('search string')){
console.log(data)
}
});
fs.readFile(FILE_LOCATION, function (err, data) {
if (err) throw err;
if(data.includes('search string')){
console.log(data)
}
});