title: Passing Dictionary from Views and Accessing in JavaScript
body: <p>I am passing dictionary from Views in Django, and want to access in JavaScript(written in HTML)
  This is my code written in HTML, here I want to access dictionary:</p>
  <pre><code>let map;
  // global array to store the marker object
  let markersArray = [];
  function initMap() {
    map = new google.maps.Map(document.getElementById(&quot;map&quot;), {
      center: { lat: 43.8445608, lng: -79.55882869999999 },
      zoom: 8,
    });
    addMarker({ lat: 43.8445608, lng: -79.55882869999999 }, &quot;red&quot;);
    addMarker({ lat: 43.5982087, lng: -79.6252701 }, &quot;green&quot;);
    addMarker({ lat: 43.846656, lng: -79.566523 }, &quot;green&quot;);
    addMarker({ lat: 43.839778900146484, lng: -79.57058715820312 }, &quot;green&quot;);
  }
  </code></pre>