title: Create objects from main key and value from nested object
body: <p>I'll keep it simple. Suppose I have an object like this:</p>
  <pre><code>  let myObj = {
      name:{
        value: &quot;John&quot;,
        type: &quot;contains&quot;  
      },
      age:{
        value: &quot;5&quot;,
        type: &quot;contains&quot;  
      }
    }
  </code></pre>
  <p>how can I create a new object that contains the main key but the value is just the <code>value</code> of its nested object, as follows:</p>
  <pre><code>  let myNewObj = {
      name: &quot;John&quot;,
      age: &quot;5&quot;
    }
  </code></pre>
  <p>Thanks in advance.</p>