title: How can I "unstack" my JSON data in d3.js?
body: <p>I have data in a JSON array that looks like this:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>[{"TEACHER":3.7},{"STUDENT":1.9}]</code></pre>
  </div>
  </div>
  </p>
  <p>My desired output is a JSON array that looks like this:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var statements = [
    {
      name: "TEACHER",
      value: 3.7
    },
    {
      name: "STUDENT",
      value: 1.9
    }
  ];</code></pre>
  </div>
  </div>
  </p>
  <p>How can I &quot;unstack&quot; the data I have to add the variable labels like I want?</p>