title: How to use Angular-6 HttpClient method in a for-loop
body: <p>I am trying to iterate one of my HTTP  get() call. It doesn't work properly.  I don't know in Angular 6 how can work HTTP method in for loop. Another issue is that If I omit the for loop then the rxjs delay() function doesn't work. </p>
  
  <pre><code>getRoleOftheUser() {
  
     for ( let i = 0; i &lt; this.arr.length; i++) {
         return  this.http.get&lt;any&gt;(`${this.baseURL}/aaa/groups/${this.arr[i]}/effectiveRolesByUser`)
          .pipe(map(res =&gt; res) , delay(5000) ).subscribe(result =&gt; console.log(result));
          }
      }
  </code></pre>
  
  <p>This is not an asynchronous javaScript issue. It's all about rxjs looping.
  Does anyone please guide me how I can iterate HTTP call in for loop in Angular 6?
  Thanks</p>