title: How to get the value of the Name of an element inside a JSON object?
body: <p>I have the following object:</p>
  <pre><code>var list = {
      &quot;to do&quot;: {
      key: 99, 
      important: [&quot;example1&quot;, &quot;example2&quot;], 
      others: [&quot;example3&quot;, &quot;example4&quot;]
      }
  };
  </code></pre>
  <p>I want to understand how I can extract the value <code>to do</code> from <code>list</code>.</p>
  <p>I want to log the value to a variable: <code>var x = &quot;to do&quot;</code></p>
  <p>I tried to locate it, but <code>to do</code> does not seem to have an index. <code>list[0] // undefined</code>.</p>
  <p>Does anyone have a simple solution how to do this ?</p>