In the main script(app.js) which is using express the following code generates targetlist and after that index.ejs will render again. I try to send the targetlist from the main script to the front to generate word cloud.
for (const [key, value] of Object.entries(output.list)) {
targetlist.push([`${key}`, value]);
}
response.render('index',{targetlist:targetlist});
In
index.ejs
I have a word cloud that is using wordcloud2.js @timdream.In the main script(app.js) which is using express the following code generates targetlist and after that index.ejs will render again. I try to send the targetlist from the main script to the front to generate word cloud.
it is not passing data to script tag.