title: How to convert array to object that has child as next array item on javascript?
body: <p>I have an array like
  <code>[ {a: 1}, {b:2}, {c:3} ]</code></p>
  
  <p>I want to convert this array to an object like:</p>
  
  <p><code>{ a: 1, child: {b: 2, child: { c: 3 } } }</code></p>
  
  <p>That's the question.</p>