title: React/JavaScript: Flatten nested array while renaming properties in React
body: <p>I have a nested array in state that I need to flatten.  For example:</p>
  
  <pre><code>nestedArray = [{ name: 'Dog', obj: {fname:'Bigdog'}, sec{time: 15}},
                { name: 'Bird', obj:{fname: Bigbird'}, sec:{time: 23}}]
  </code></pre>
  
  <p>But I need a flat array that looks like this:</p>
  
  <pre><code>newArray =[ {id: 1, content: Bigdog, start: 15},
               {id:2, content: Bigbird, start: 23}
  </code></pre>