title: Creating an associative array in JavaScript using the map function
body: <p>I've an array of objects with the following format</p>
  <pre><code>[{'list': 'one', 'item': 1},
   {'list': 'one', 'item': 2},
   {'list': 'one', 'item': 3},
   {'list': 'two', 'item': 1},
   {'list': 'two', 'item': 2}]
  </code></pre>
  <p>And I want to transform it like this</p>
  <pre><code>[{'one': [1, 2, 3]},
   {'two': [1, 2]}]
  </code></pre>
  <p>How can I do it using the Array.map function? Is it the best alternative?</p>