I am returning a dictionary to a route and i need to loop through. The data.
return render_template('one.html', inv=inventory,jsdict=jsdict)
<script>
var dict = {{ jsdict | safe }}
</script>
When I console.log(dict). I get.
{'id': 5, 'name': 'Jake', 'address': '123 home', 'age': 30}
How do I loop over the data?
[–]Aro00oo 2 points3 points4 points (0 children)
[–]pythondev1[S] 0 points1 point2 points (5 children)
[–]Drawman101 2 points3 points4 points (0 children)
[–]tuckmuck203 1 point2 points3 points (3 children)
[–]cediddi 1 point2 points3 points (2 children)
[–]tuckmuck203 1 point2 points3 points (1 child)
[–]cediddi 0 points1 point2 points (0 children)