title: access 2nd level of json object
body: <p>I have a data object that looks like this:</p>
  
  <pre><code>[
    {
      "key": "K1204", 
      "values": [
        {
          "key": "Both", 
          "values": [
            {
              "key": 1420070400000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1422748800000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1425168000000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1427846400000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1430438400000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1433116800000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1435708800000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1438387200000, 
              "values": 27927.734942179697
            }, 
            {
              "key": 1441065600000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1443657600000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1446336000000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1448928000000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1451606400000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1454284800000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1456790400000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1459468800000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1462060800000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1464739200000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1467331200000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1470009600000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1472688000000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1475280000000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1477958400000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1480550400000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1483228800000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1485907200000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1488326400000, 
              "values": 36929.200142179696
            }
          ]
        }
      ]
    }
  ]
  </code></pre>
  
  <p>and what I'm trying to do is get it to look like this:</p>
  
  <pre><code>[
        {
          "key": "Both", 
          "values": [
            {
              "key": 1420070400000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1422748800000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1425168000000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1427846400000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1430438400000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1433116800000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1435708800000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1438387200000, 
              "values": 27927.734942179697
            }, 
            {
              "key": 1441065600000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1443657600000, 
              "values": 27927.7349421797
            }, 
            {
              "key": 1446336000000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1448928000000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1451606400000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1454284800000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1456790400000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1459468800000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1462060800000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1464739200000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1467331200000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1470009600000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1472688000000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1475280000000, 
              "values": 36929.2001421797
            }, 
            {
              "key": 1477958400000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1480550400000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1483228800000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1485907200000, 
              "values": 36929.200142179696
            }, 
            {
              "key": 1488326400000, 
              "values": 36929.200142179696
            }
          ]
        }
      ]
  </code></pre>
  
  <p>I've tried this:</p>
  
  <pre><code>var data_costByScn2 = data3.values
  
  console.log("data3val: ", data_costByScn2)
  </code></pre>
  
  <p>but it returns undefined...how do I get it to return the just the next level in the json object?</p>