title: Display Subscribe Data in Angular 4
body: <p>I need help in displaying the output of subscribe from an api in Angular 4. How can i do this since I wrote data.data.data but it says property data doesnt exist on type object. How would i output it in the browser? Here's my code below and the api picture below</p>
  
  <p><a href="https://i.stack.imgur.com/025co.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/025co.jpg" alt="enter image description here"></a></p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { NewsService } from '../news.service';
  
  @Component({
    selector: 'app-news-list',
    templateUrl: './news-list.component.html',
    styleUrls: ['./news-list.component.css']
  })
  export class NewsListComponent implements OnInit {
  
    constructor(private newsService: NewsService) { }
  
    ngOnInit() {
  
      this.newsService.getNews()
        .subscribe(
          data =&gt; {
            alert("News Success");
            console.log(data);
          },
          error =&gt; {
            alert("ERROR");
          });
    }
  }
  </code></pre>