Flask passe un éventail de dicts

#python
def func1():
        data = filter() #returns a list of dictionaries

    return render_template("template1.html", data=data)

  
 #javascript
myvar = '{{data|tojson}}';
var parsed = JSON.parse(myvar);
Alfred van der Heide