title: Iterate Array of object in Angular 4
body: <p>I want to interate array object inside the <strong><em>subscribe</em></strong></p>
  
  <p><strong>test.ts file</strong></p>
  
  <pre><code>  export class AppComponent  implements OnInit {
        title = 'app works!';
        observableBooks: Observable&lt;Book[]&gt;
        books: Book[];
        newarray: any[];
        errorMessage: String;
        constructor(private bookService: BookService) { }
        ngOnInit(): void {
             this.observableBooks = this.bookService.getBooksWithObservable();
                 this.observableBooks.subscribe(books =&gt; { 
               for (let entry of books) {
                 // push the value into db
            }
  
           let retrivedata: Array&lt;number&gt; = //retrive the db collection again
  
  
  
  
                  error =&gt;  this.errorMessage = &lt;any&gt;error
                });
  
        }
  
      }
  </code></pre>
  
  <p><strong>test.html file</strong></p>
  
  <pre><code>&lt;ul *ngFor="let book of retrivedata | async"&gt;
        &lt;li&gt;{{book.price}}&lt;/li&gt;
      &lt;/ul&gt;
  </code></pre>
  
  <p>I need to iterate this "arrayofObj" in HTML page, which means angular template page</p>