I'm trying to pass some variables from my view to my javascript. I cannot seem to find any thing online about converting python lists and dicts to JS.
<script>
var list = '{{area_dict}}'
console.log(list)
</script>
the console returned:
{'9': [['Walls2', '20'], ['asd', '21']], '22': [['BD 1', '6']]}
while i just need {'9': [['Walls2', '20'], ['asd', '21']], '22': [['BD 1', '6']]}
It seems to convert my python into HTML; I need it to be the same style as my original python. Are there any django filters for this?