title: I am trying to populate a DOJO pie chart from a json array created by a url
body: <p>I am trying to populate a dojo pie chart from a json array created by a url.</p>
  
  <p>the url returns an array that looks like this </p>
  
  <blockquote>
    <p>{"pieItems":[["IPv4 TCP",475919493840],["IPv6 TCP",37443255432],["IPv4 UDP",34595392128],["IPv6 ICMP",14496],["IPv4 ICMP",46560],["IP Other",12385112]]}</p>
  </blockquote>
  
  <p>I have attempted to redo the format of the array changing it to one that looks like this</p>
  
  <blockquote>
    <p>{"IPv4 TCP":[475919493840],"IPv6 TCP":[37443255432],"IPv4 UDP":[34595392128],"IPv6 ICMP":[14496],"IPv4 ICMP":[46560],"IP Other":[12385112]} .</p>
  </blockquote>
  
  <p>the code I used to change the format is:</p>
  
  <pre><code>var len = responseObj.pieItems.length, i, hash = {};
      for (i = 0; i &lt; len; i++) {
          hash[responseObj.pieItems[i][0]] = responseObj.pieItems[i][1];
      }
  </code></pre>
  
  <p>After changing the format I can only populate the chart with on item by adding the series and specifying the name.</p>
  
  <blockquote>
    <p>chart1.addSeries("IP Other",  hash["IPv6 ICMP"]) </p>
  </blockquote>
  
  <p>This populates the chart with that one item but if i try to add another series for example</p>
  
  <blockquote>
    <p>chart1.addSeries("IP Other",  hash["IPv4 Other"])</p>
  </blockquote>
  
  <p>It overwrites the chart and shows the data for IP Other instead of adding another slice. </p>
  
  <p>How can I add all the items in the array into the pie chart?</p>