title: angular group by while iterating records on select list
body: <p>Let's say if I've data coming in JSON like this.</p>
  
  <pre><code>[
  {
  "id": 10,
  "session": "test2",
  "event": "Event 2"
  },
  {
  "id": 11,
  "session": "TEST 22",
  "event": "Event 2"
  },
  {
  "id": 9,
  "session": "test 1",
  "event": "Event 1"
  }
  ]
  </code></pre>
  
  <p>I want to group the records by event, (Event 2 is repeated) and display a select box while keeping track of the id (on $scope so I can update the form).</p>
  
  <p>Expectation.</p>
  
  <pre><code>&lt;select&gt;
    &lt;optgroup label="Event 1"&gt;
        &lt;option value="10"&gt;test2&lt;/option&gt;
    &lt;/optgroup&gt;
    &lt;optgroup label="Event 2"&gt;
         &lt;option value="11"&gt;Test 22&lt;/option&gt;
         &lt;option value="9"&gt;test 1&lt;/option&gt;
     &lt;/optgroup&gt;
  &lt;/select&gt;
  </code></pre>