I am trying to get a "json" object from a python dictionary using djnago template "json_script",which is throwing "template syntax error"
//html code
{{ value|json_script:"hello-data" }}
<script>
var Value=JSON.parse(document.getElementById("hello-data").textContent);
document.write(Value);
</script>
//views.py
from django.shortcuts import render
from django.http import HttpResponse
import random as ran
# Create your views here.
def indees(request):
vals={"123":"abc","Key":"value","hello":"user"}
return render(request,"verbat.html",context={"value":vals})