title: Passing JSON data in HTML to JSON
body: <p>From my controller page, I set my JSON to .jsp</p>
  
  <pre><code>jsonObject.add("map:", jsonArray);
  session.setAttribute("mapJSON", gson.toJson(jsonObject));
  </code></pre>
  
  <p>Right now my .jsp page stores a JSON output from my controller</p>
  
  <pre><code>&lt;%=session.getAttribute("mapJSON")%&gt;
  </code></pre>
  
  <p>From the same .jsp page, I got a script tag below trying to get the JSON data and generate some result</p>
  
  <pre><code>var colors = ['rgb(240,249,232)', 'rgb(204,235,197)', 'rgb(168,221,181)', 'rgb(123,204,196)', 'rgb(78,179,211)', 'rgb(43,140,190)', 'rgb(8,88,158)'];
  var data = {};
  var mapJSON = &lt;%=session.getAttribute("mapJSON")%&gt;;
  
  $(document).on('click', '#map-btn', function (event) {
      $('#place').html('-');
      $('#interest-point').html('-');
  
  
      $.getJSON(mapJSON , function (results) {
          results.map.forEach(function (area, i) {
              var id = area['place'];
              var population = area['interest-point'];
  
              data[id] = area;
  
              $('#' + id).css('fill', colors[population]);
          });
      });
  });
  </code></pre>
  
  <p>Are they any ways that I could access my JSON data from jQuery?</p>