2👍
✅
You redesign your code in such a way that in the templates you make calls to javascript functions with the template variables as arguments:
<script type="text/javascript">
x = foo({{ business }}, {{ some_other_variable }});
alert(x);
</script>
Source:stackexchange.com