I'm trying to replace all instances of 'formattedTime' in a massive string. Here's my code
googleTrends.interestOverTime({keyword: selectedTopic})
.then((results) => {
results.replace(/formattedTime/g, 'no what the heck');
console.log(results);
})
.catch((err) => {
console.error('Oh no there was an error', err);
});
I am not receiving any errors however nothing is happening inside my console. I even tried replacing a single line string but none of it will work. It might be because of the promise I'm receiving? I am relatively new to RegEx so I thought maybe that was an issue but it doesn't seem to be.