title: Angular 2 way to get item from Observable<Xyz[]>
body: <p>Given the following Typescript in an Angular 2 service:</p>
  
  <pre><code>getLanguages () {
      return this.http.get(this._languagesUrl)
          .map(res =&gt; &lt;Language[]&gt; res.json().data)
          .catch(this.handleError);
  </code></pre>
  
  <p>I'm having difficulty using this in circumstances where I need to lookup a specific item from the array. For example, I can't do the following because <code>filter</code> expects an <code>Observable&lt;Language&gt;</code> rather than an the <code>Observable&lt;Language[]&gt;</code> that is being returned.</p>
  
  <pre><code>getLanguages().filter(language =&gt; language.id == 3) // Error
  </code></pre>
  
  <p>I appreciate that my issue may be that I'm mixing synchronous and asynchronous behavior, so Ill provide my use case: User can enter a language id and I want to display the associated language name. I want to leverage <code>getLanguages()</code> with the <code>Observable</code> result because it is already being used elsewhere in the project. I also want implement some caching so the HTTP request doesn't get made each time I do a lookup.</p>
  
  <p>Any thoughts?</p>