title: Angular: http RxJS dependant http requests
body: <p>I am developing a small app with Angular 14.1. I need to create a service that get information from N endpoint and is
  dependant of an endpoint. I need a solution that could retrieve previous information fast as possible. This data will be
  consumed by a component.</p>
  <p>Extended information:</p>
  <p>Current service is required to request information from HTTP endpoint that return some data like this:</p>
  <pre><code>{
    &quot;name&quot;: &quot;test&quot;,
    &quot;documents&quot;:[
      {
        &quot;id&quot;: 1,
        &quot;name&quot;: &quot;document 1&quot;,
        &quot;type&quot;: &quot;a&quot;
      }, {
        &quot;id&quot;: 2,
        &quot;name&quot;: &quot;document 2&quot;
        &quot;type&quot;: &quot;b&quot;
      },
      {
        &quot;id&quot;: 3,
        &quot;name&quot;: &quot;document 3&quot;
        &quot;type&quot;: &quot;a&quot;
      }
    ]
  }
  </code></pre>
  <p>With previous response:</p>
  <ol>
  <li><p>I need to filter all documents that their type are &quot;a&quot;</p>
  </li>
  <li><p>I need for each &quot;id&quot; create a new HTTP request to another endpoint to get more information. Return some data like this:</p>
  <pre><code>{
      &quot;name&quot;: &quot;document 1&quot;,
      &quot;type&quot;: &quot;a&quot;,
      &quot;start&quot;: &quot;2022-10-10&quot;
  }
  </code></pre>
  </li>
  <li><p>I need to get a class instance for previous data.</p>
  </li>
  </ol>
  <p>I tried different ways that I think that are too dirty. Could you help me?</p>
  <p>Thanks!</p>