title: Unexpected token { in JSON while passing data from flask to javascript
body: <p>I am trying to pass simple data from flask to javascript file 
  I am following this answer
  <a href="https://stackoverflow.com/questions/42499535/passing-a-json-object-from-flask-to-javascript">Passing a JSON object from Flask to JavaScript</a></p>
  
  <p>But i got Uncaught SyntaxError: Unexpected token { in JSON at position 1
      at JSON.parse ()</p>
  
  <pre><code>var user = JSON.parse('{{ data | tojson}}');      
   var grade=user.grade;
   console.log(grade);
  </code></pre>
  
  <p>my python file have code </p>
  
  <pre><code>@app.route("/quiz/0")
  def quizFirst():
      data={"grade":"0"}
      return render_template('quiz.html',data=data)
  </code></pre>
  
  <p>the token { is not recognizable by javascript in js file, Any idea what i am missing.</p>