When viewing the data:
'some_array': ['text1','text2', 'text3']
Upon trying to pass it to a JS script in the template:
<script type="text/javascript">
some_func({{ some_array }});
</script>
However, in the source code, it appears as:
<script type="text/javascript">
some_func([u'text1', u'text2', u'text3']);
</script>
This results in a JavaScript error being thrown.
Is there a way to remove the u''
prefix from the array's elements or work around this issue?
Thank you!