title: Transforming object of objects in React
body: <p>I am fairly new to JS and React and I am stuck with the following problem (maybe it is simple but I don't know how to solve this).</p>
  
  <p>This is the object that I have:</p>
  
  <pre><code>{
    React: {
      title: 'React',
      questions: [
        {
          question: 'What is React?',
          answer: 'A library for managing user interfaces'
        },
        {
          question: 'Where do you make Ajax requests in React?',
          answer: 'The componentDidMount lifecycle event'
        }
      ]
    },
    JavaScript: {
      title: 'JavaScript',
      questions: [
        {
          question: 'What is a closure?',
          answer: 'The combination of a function and the lexical environment within which that function was declared.'
        }
      ]
    }
  }
  </code></pre>
  
  <p>And this is what I need:</p>
  
  <pre><code>[
    { title: "React", questions: 2},
    { title: "JavaScript", questions: 1}
  ]
  </code></pre>
  
  <p>I already tried <code>Object.keys</code> and then mapping over it - which gives me either the titles or questions in a new array.</p>