[Answer]-How to store data returned by Django view in a JavaScript variable?

1👍

Just access it as you would any other Django variable:

<script language="JavaScript">

var mydata = "{{data}}";
document.write("Data is: " + mydata);

</script>

Leave a comment