title: RxJS 6 get a filtered list of array of Observable
body: <p>In my ThreadService class, I have a function <code>getThreads()</code> that return me a <code>Observable&lt;Thread[]&gt;</code> with all my threads.</p>
  
  <p>Now, I would like to have another version of my function with my threads filtered by a selected theme : function <code>getSelectedThemeThreads(theme: Theme)</code>.</p>
  
  <p>I tried with the operators <code>map</code> and <code>filter</code> but I have the following error message <code>Property 'theme' does not exist on type 'Thread[]</code>.</p>
  
  <p>Below the code I am working on :</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpClient } from '@angular/common/http';
  import { Observable, of } from 'rxjs';
  import { catchError } from 'rxjs/operators';
  import { Thread } from '../models/thread.model';
  import { Theme } from '../models/theme.model';
  
  @Injectable({
    providedIn: 'root'
  })
  export class ThreadService {
    private threadsUrl = 'api/threads';
  
  constructor(private http: HttpClient) { }
  
  getThreads(): Observable&lt;Thread[]&gt; {
    return this.http.get&lt;Thread[]&gt;(this.threadsUrl);
  }
  
  getSelectedThemeThreads(): Observable&lt;Thread[]&gt; {
    return this.http.get&lt;Thread[]&gt;(this.threadsUrl).pipe(
      map(threads =&gt; threads),
      filter(thread =&gt; thread.theme.id === theme.id)
    );
  }
  </code></pre>
  
  <p>Thanks in advance for your help.</p>