[Answered ]-Why am I getting this javascript error when I'm doing my Django?

2👍

You have to do:

var params = JSON.parse('{{ all_params_in_json|escapejs }}');

Otherwise e.g ‘ char inside all_params_in_json variable terminates string and all hell breaks loose.

0👍

Sounds like you use invalid characters for label’s inside the JSON. Check this, it may be browser-dependent what’s legal or not.

Leave a comment