title: property 'filter' does not exist on type 'observable<any>'
body: <p>When trying to compile, i get the error </p>
  
  <pre><code>property 'filter' does not exist on type 'observable&lt;any&gt;'
  </code></pre>
  
  <p>after searching a bit, i found the recommendation to insert </p>
  
  <pre><code>import 'rxjs/add/operator/filter'
  </code></pre>
  
  <p>after this, i get the same error, but for sort</p>
  
  <pre><code>property 'sort' does not exist on type 'observable&lt;any&gt;'
  </code></pre>
  
  <p>So, i removed the sort, and then i get the following error:</p>
  
  <pre><code>Type 'Observable&lt;any&gt; is not assignable to type 'any[]'. Property 'includes' is missing in type 'Observable&lt;any&gt;.
  </code></pre>
  
  <p>The information is imported from a json file</p>
  
  <p>Part of the code:</p>
  
  <pre><code>import { Component, OnInit, Injectable } from '@angular/core';
  import { UserinfoService } from '../services/userinfo.service';
  import { Member } from '../class/member';
  import { MatDialog } from '@angular/material';
  import { MemberdialogComponent } from '../memberdialog/memberdialog.component';
  import 'rxjs/add/operator/filter';
  
  @Component({
      selector: 'app-teammembers',
      templateUrl: './teammembers.component.html',
      styleUrls: ['./teammembers.component.css']
  })
  
  export class TeammembersComponent implements OnInit
  {
  
  //props
  teamMembers: any[];
  searchQuery: any = "";
  searchResults: any[] = this.teamMembers;
  teams: any[];
  selectedTeam: any;
  
  //constructor
  constructor(private userinfoService: UserinfoService, public dialog: MatDialog)
  {
      //getData
    this.teamMembers = userinfoService.getMembers()
      .filter(member =&gt; member.isActive)
      .sort((a, b) =&gt; a.lastName.localeCompare(b.lastName));
  
      //put all information in results
      this.searchResults = this.teamMembers;
  
      //getTeams
      this.teams = this.teamMembers
          .map(item =&gt; item.team)
          .filter((value, index, self) =&gt; self.indexOf(value) === index)
  }
  </code></pre>
  
  <p>code for userinfoservice:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Http, Response } from '@angular/http';
  import { Observable } from 'rxjs/Observable';
  import 'rxjs/add/operator/catch';
  import 'rxjs/add/operator/map';
  
  import { Member } from '../class/member';
  
  @Injectable()
  export class UserinfoService
  {
  
      //constructor
      constructor(private http: Http)
      {
  
      }
  
      //methods or services
  
      getMembers()
      {
          return this.http.get('http://fakelocation/JsonData/api/teammembers').map(response =&gt; response.json())
      }
  </code></pre>