title: Angular - map is not a function
body: <p>I'm trying to filer an Observable in my angular project, but it says: "... .map is not a function" so, can you explain what's wrong with my code?</p>
  
  <p><strong>tasks.component.ts</strong> <em>(map also imported from rxjs/operators)</em></p>
  
  <pre><code>ngOnInit() {
      this.tasks = this.tasksService.tasks.map(x =&gt; x.filter(y =&gt; y.isDone == this.completed));
      this.tasksService.getTasks();
    }
  </code></pre>
  
  <p>And here's my service which provides the Observable:</p>
  
  <p><strong>task.service.ts</strong></p>
  
  <pre><code>export class TasksService {
    private _tasks = new BehaviorSubject&lt;Task[]&gt;([]);
    tasks = this._tasks.asObservable();
    constructor(private http : Http) {
      console.log('Tasks Service is initialized...');
    }
  
    getTasks() {
      this.http.get(URL).subscribe(x =&gt; {
        this._tasks.next(x.json());
      });
    }
  </code></pre>