How would it be possible to access or iterate a django list within javascript using a changing INDEX.
For example:
<script>
for (var i=0; i < "{{ django_list|length }}".toInt(); i++) {
var e = "{{ django_list" + i.toString() + " }}"; // this gives an error
... // it does not parse a chunked ^ template variable properly
...
}
</script>
Some background. This is a pure .js file that is being rendered by django. That part works, it just does not interpret a substringed out django template var syntax.
I'd prefer a solution which avoids encoding into JSON or anything similar. Template form is preferred because I need the methods of the variables.
Thanks.