title: Pass variable value outside out a loop
body: <p>I know that probably would be the dumbest question to ask, but its a desperate attempt from a UI guy to do something... i have getting some values from a json file, and then i am passing those values to plot a graph using jflot.</p>
  
  <p>//Script</p>
  
  <pre><code>function plot4() {
      $.getJSON("wc.json",function(data){
          $.each(data.posts, function(i,data){
              var wc = data.title;
              alert(wc);
          });
      });
  
      function drawPlot() {
          alert(wc);
          // function which draws plot using jFlot using a huge dataset
      }
  }
  </code></pre>
  
  <p>Is it okay that i wrap the getjson file outside the drawPlot function ??.. pls advice</p>