I came across the String interpolation feature in ES6. It works if I define the raw string in the code. But I want to read the raw string from a file and then replace the placeholders. How to do it?
file.txt
hello ${customer.name}
Node JS
var customer = {name: 'sid'};
var data = fs.readFileSync("file.txt","utf8");
// what should go here so that data is 'Hello sid'?