title: How to access key values in an object using d3.js?
body: <p>I have an array named "dataset" where each entry is an object with a key and value attribute, such as the following:</p>
  
  <pre><code>dataset= 
   [
   {"key":"alpha", "value": [ {}, { } ...]},
   {"key":"beta", "value": [ { }, { } ...]},
   {"key":"gamma", "value": [ {}, { } ...]},
   {"key":"delta", "value": [ { }, { } ...]}
   ];
   dataset.domain:[];
   dataset.query:[];
   dataset.range:[];
  </code></pre>
  
  <p>I am working with D3.JS and I am using this dataset to plot in an stacked area chart the alpha, beta, gamma, and delta values. How can I use color.domain() to assign a different color to each "key"? </p>