How to pass an array in Django to a template and use it with JavaScript April 3, 2023 by Tarik Try using {{ array1|safe }} and see if that makes any difference.