title: How to use rxjs map to dig into a HttpClient get request response?
body: <p>I'm setting up an Angular service that does a get request to SWAPI.
  I want to map the response to subscribe only to the part I am interested in (in my case: the planets).</p>
  
  <p>The problem is rather simple: I have the error "TS2339: Property 'results' does not exist on type 'Object'". </p>
  
  <p>Does someone know what I don´t get here?</p>
  
  <p>Thanks a lot!</p>
  
  <pre><code>export class PlanetsService {
    private apiUrl = 'https://swapi.co/api/planets/';
  
    constructor(private http: HttpClient) { }
    allPlanets(): Observable&lt;Planet[]&gt; {
      return this.http.get(this.apiUrl)
        .pipe(
          map(res =&gt; res.results)
        );
    }
  }
  </code></pre>