Hi, I'm trying to get data from a page's collection into Javascript (for use with a data-visualization library). Is there any elegant way to do this ?
Right now I'm doing something like this :
<script>
var t = [];
</script>
{% for child in collection %}
<script>
t.push({title: '{{ child.title }}'});
</script>
{% endfor %}
But this pollutes my page with many script tags.