title: Concatenate Nested Array after Mapping
body: <p>I have an array with several category objects, each of which has an <code>items</code> property containing an array of item objects.  I want to map each item in each category to an object[] with objects that have the properties value and label.  For some reason, I can't perform the concatenation.</p>
  
  <pre><code>var categories = [{
                  name: "category1",
                  items: [{
                      itemId: 1,
                      name: "Item1"
                  }, {
                      itemId: 2,
                      name: "Item2"
                  }]
              }, {
                  name: "category2",
                  items: [{
                      itemId: 3,
                      name: "Item3"
                  }, {
                      itemId: 4,
                      name: "Item4"
                  }]
              }];
  
  var items = [];
  for(var i = 0; i &lt; categories.length; i++){
      items.concat($.map(categories[i].items,function(elem){
          return {value:elem.itemId, label:elem.name};
      }));
  } 
  console.log(items); //prints []
  </code></pre>
  
  <p><strong>Expected Result</strong></p>
  
  <pre><code>[{
     label: "Item1",
     value: "1"
  },
  {
     label: "Item2",
     value: "2"
  },{
     label: "Item3",
     value: "3"
  },{
     label: "Item4",
     value: "4"
  }
  </code></pre>
  
  <p>I feel as if I am missing something very basic.  I logged the result of the <code>$.map</code> function and it appears to be returning an <code>[]</code>.  Can anyone figure out the issue?</p>
  
  <p><strong>JSFiddle:</strong> <a href="http://jsfiddle.net/vymJv/" rel="noreferrer">http://jsfiddle.net/vymJv/</a></p>