I am selecting info from the database and rendering it to an html page. My queries work but for some reason when it sends it to the html page it displays an array that says object inside each index.
app.get('/watchlist',function(req,res) {
var obj={};
username = req.session.username;
con.query('SELECT symbol FROM watch_list WHERE username =?', [username], function (err, result) {
console.log(result);
obj= result;
res.render('watchlist.html', { symbol:obj });
});
});
{% block content %}
<h2>Create a Stock Watchlist </h2>
<p>{{ symbol }}!</p>
{% endblock %}
This is what the output looks like-[object Object],[object Object],[object Object].
The expected out put is all of the rows selected from the query.