title: JavaScript array manipulation interview question
body: <p>This is a question that I have encountered during an interview:</p>
  <p>Write a function to transform the array:</p>
  <pre><code>[
    {name:'a',values:[1,2]},
    {name:'b',values:[3]},
    {name:'a',values:[4,5]}
  ]
  </code></pre>
  <p>to:</p>
  <pre><code>[
    {name:'a',values:[1,2,4,5]},
    {name:'b',values:[3]}
  ]
  </code></pre>
  <p>I know this is not hard, but I just can't figure it out.
  Does anyone know how to solve it?
  Are there any places that I can find and practice more practical questions like this one?</p>