title: Angular 2 and RxJS: How to change HTTP call that returns Observable
body: <p>How do I change this function to work with the JSON change described below?</p>
  
  <p>The current function returns an <code>Observable&lt;User[]&gt;</code>, but with the new JSON, the new <code>admin</code> object has been added. The new function should successfully observe both the existing <code>users</code> array and the new <code>admins</code> array.</p>
  
  <pre><code>getData(): Observable&lt;User[]&gt; {
    return this.http
      .get('www.example.com/api/users)
      .map((r: Response) =&gt; r.json().assets.users as User[]);
  }
  </code></pre>
  
  <p>JSON returned from <code>/api/users</code></p>
  
  <pre><code>{
  "assets": {
      "users": [
          // user objects
      ]
  }
  </code></pre>
  
  <p>...now returns two arrays, <code>users</code> and <code>admins</code>.</p>
  
  <pre><code>{
  "assets": {
      "users": [
          // array of user objects
      ],
      "admins": [
          // array of admin objects
      ]
  
  }
  </code></pre>
  
  <p>Please assume that my code does have <code>User</code> and <code>Admin</code> classes already created that correctly reflect the properties of the related JSON objects returned.</p>