title: Correct way of using RxJS
body: <p>I have this method in Angular (latest, package.json shows 7.0.0) and <code>Rxjs 6.3.3</code>. I am calling a <strong>SpringBoot</strong> Rest API that returns a list of Flights. I want to convert into <code>Observable&lt;Flight[]&gt;</code>.</p>
  
  <pre><code>search(searchquery): Observable&lt;Flight[]&gt;
    {
      return this.http.post('/searchservice/search/get', searchquery)
        .pipe(map(response =&gt; 
        {
          return (response.map((flight: Flight) =&gt;
          {
            return new Flight().deserialize(flight);
          }));
        }));
  
    }
  </code></pre>
  
  <p>But when building, I get this error </p>
  
  <blockquote>
    <p>"error TS2339: Property 'map' does not exist on type 'Object'"</p>
  </blockquote>
  
  <p>. The error is shown in the <code>response.map((flight: Flight) =&gt;</code> code. May I know what I am doing wrong?
  Based on the query below, this is the json response printed.</p>
  
  <pre><code>0: {id: 4, flightNumber: "BF101", origin: "NYC", destination: "SFO", flightDate: "22-JAN-16", …}
  1: {id: 7, flightNumber: "BF105", origin: "NYC", destination: "SFO", flightDate: "22-JAN-16", …}
  2: {id: 10, flightNumber: "BF106", origin: "NYC", destination: "SFO", flightDate: "22-JAN-16", ..}
  </code></pre>
  
  <p>And one more thing. The code worked perfectly yesterday, but today morning, it started showing errors. Weird!!!
  What I am trying to do is similar to this code below which is written in the book, The complete book on Angular.</p>
  
  <pre><code>return this.http.get(queryUrl)
    .map((response: Response) =&gt; {
     return (&lt;any&gt;response.json()).items.map(item =&gt; {
     SearchResult({
        id: item.id.videoId,
        title: item.snippet.title,
        description: item.snippet.description,
        thumbnailUrl: item.snippet.thumbnails.high.url
      });
    });
  });
  </code></pre>