title: How to use variables within a JSON object with JustGage
body: <p>I'm going crazy and hope someone can help. I have an array that I am  accessing with Jquery using the getJson function.</p>
  
  <p>I am trying to figure out how I can access and use the variables within the json object. I want to use the variables with a javascript plugin called <a href="http://justgage.com/" rel="nofollow">justgage</a>. </p>
  
  <p>Here is my array on my_url.php</p>
  
  <pre><code>  &lt;?php
  
  $my_data=array(min=&gt;"100",max=&gt;"200", total=&gt;"50");
  
  // sending output
  header('Content-Type: text/json');
  echo json_encode($my_data,true);
  ?&gt;
  </code></pre>
  
  <p>Here is my code that gets the array</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function(){
    $("button").click(function(){
  $.getJSON("my_url.php",function(result){
   $.each(result, function(key, value){
                  $("#showdata").append(key+value);
              });
          });
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Which gives me</p>
  
  <pre><code>min100max200total50
  </code></pre>
  
  <p>I want to know how to get this data into the variables needed by the justgage script below?</p>
  
  <pre><code>&lt;script&gt;
  
    var g = new JustGage({
      id: "gauge",
      value: total,
      min: 0,
      max: 100,
      title: "Sample Data"
    });
  &lt;/script&gt;
  </code></pre>