title: Uncaught SyntaxError: Unexpected token & : jquery django context dict error
body: <p>I am trying to assign a <code>context</code> dict to a jQuery variable in my django <code>html</code> template and I am getting the following error message in my browser's console:</p>
  
  <p><code>Uncaught SyntaxError: Unexpected token &amp;</code></p>
  
  <p>This is how I've assigned the context value (dict) to the javascript variable:</p>
  
  <pre><code>var foo = {{ bar }};
  </code></pre>
  
  <p>Where <code>bar</code> is the context variable passed from the <code>view</code></p>
  
  <p>The context is not taken as a javascript object.</p>
  
  <p>Any help is much appreciated.</p>