title: Angular 5 - Populate Options In mat-select With Objects? Not With NgFor?
body: <p>NgFor populates a dropdown or list by iterating through an array.  However, Observables give us a stream of data, in my case objects, that is already "iterated".  Why loop? Just get to work making options.</p>
  
  <pre><code>{skill_id: 8, skill_name: "Whatever"}
  {skill_id: 9, skill_name: "Something"}
  </code></pre>
  
  <p>It seems that I shouldn't need an array when I have such a nice stream of objects that should replace NgFor.  I'm thinking something like this and creating a new option as objects are received from the Observable:</p>
  
  <pre><code>&lt;mat-select  placeholder="Select one"&gt;
      &lt;mat-option (click)="loadIdValueInForm(skill_id)"
                      [value]="skill_name"&gt;{{skill_name}}
      &lt;/mat-option&gt;
  &lt;/mat-select&gt;
  </code></pre>
  
  <p>There are a variety of older posts that do this in various ways from an array of objects, but it would be better if we could do it with the results of a common Observable setup.  Any ideas?  Anyone creative about this?</p>
  
  <pre><code>private getListData(dbTable) {
      this.skills$ = this.httpService.getDropDownList(dbTable)
        .map(data =&gt; data.resource)
        .switchMap(data =&gt; data)
  </code></pre>