I want to pass a list to Jquery and then use it with the Autocomplete jqueryui widget. It is a small list, so I don't think I need a new request. So, I guess I don't need to use Jsquery's getJSON.
I have:
json_list = json.dumps(list)
context = {'json_list':json_list}
return render(request, template, context)
in jquery:
var json_list = JSON.parse({{json_list}});
$("#field").autocomplete({
source: json_list
});
I get a Syntax Error on """:
var autores_json = JSON.parse(["Friedrich Hayek", "Milton Friedma...
Im kind of lost here. Any help will be appreciated.