title: Angular 4 HttpClientModule and map() function
body: <p>I am facing an issue in regard to new <code>HttpClientModule</code> and the <code>map()</code> function from RX.js.</p>
  
  <p>What I want to do is to change the objects of the returned array inside the observable coming from the <code>get()</code> method.</p>
  
  <p>My curent code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>get(url: string): Observable &lt; any &gt; {
    return this.http.get(this.config.baseUrl + url);
  }
  
  
  playerSearch(text: string): Observable &lt; any[] &gt; {
    if (text == "" || !text) {
      return Observable.of([]);
    } else {
      return this.auth.get(`/players?$expand=Contact($expand=Blob)&amp;$filter=contains(Contact/LastName, '${text}') or contains(Contact/FirstName, '${text}')`).map((x) =&gt; {
        return {
          Id: x.Id,
          Name: x.Contact.FirstName + " " + x.Contact.FatherName.substring(0, 2) + ". " + x.Contact.LastName,
          BlobSrc: this.utilitiesService.imageLinkCreator(x)
        }
      });
    }
  }
  
  search = (text$: Observable &lt; string &gt; ) =&gt;
    text$
    .debounceTime(300)
    .distinctUntilChanged()
    .do(() =&gt; this.searching = true)
    .switchMap(term =&gt;
      this.dataService.playerSearch(term)
      .do(() =&gt; this.searchFailed = false)
      .catch(() =&gt; {
        this.searchFailed = true;
        return Observable.of([]);
      }))
    .do(() =&gt; this.searching = false);</code></pre>
  </div>
  </div>
  </p>
  
  <p>The error that I get:</p>
  
  <blockquote>
    <p>Type 'Observable&lt;{ Id: any; Name: string; BlobSrc: string; }>' is not assignable to type 'Observable'.</p>
    
    <p>Type '{ Id: any; Name: string; BlobSrc: string; }' is not assignable to type 'any[]'.</p>
  </blockquote>
  
  <p>As far as I know, the <code>map()</code> method returns an <code>observable</code> with value only one object instead of an array.</p>
  
  <p>What is the correct syntax in order to return an observable containing an Array of <code>{ Id: any; Name: string; BlobSrc: string; }</code> objects?</p>