title: AngularJS sort People into Alphabetical List and Filter
body: <p>In AngularJS I have an Object with keys that are letters of the alphabet and each key is an array of people.</p>
  
  <pre><code>&lt;div ng-repeat="(letter, group) in people"&gt;&lt;/div&gt;
      &lt;div ng-repeat="people in letter"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is to create something like this in HTML:</p>
  
  <pre><code>A. Arnold, Avery, Adam, Alex
  B. Bob, Boris
  C. Chris, Connor, Caleb
  </code></pre>
  
  <p>How would I go about filtering each individual field by name? For example applying this.</p>
  
  <pre><code>&lt;div ng-repeat="people in letter | filter:{'name':search.query}"&gt;
  </code></pre>
  
  <p>Works fine, however, you get a result like this when you type "A" in:</p>
  
  <pre><code>A. Arnold, Avery, Adam, Alex
  B. 
  C.
  </code></pre>
  
  <p>How can I collapse B and C? Is there a better organization method for this data?</p>