I want to represent some entries in a list from my MongoDB database, but I want to use Jinja2 syntax, to get retrieve the entries from my database, through Flask. E.g.:
var dataArray = [{% for entry in entries %}{{ entry.value }}, {% endfor %}];
d3.select("body")
...
I think the comma is required, to seperate the values in the array, but it would still render a last comma, which is not needed. How does one do this properly?
On separate lines for clarity. It's still valid, but put all on one line if you wish.