title: angular 5 extract data from response
body: <p>product-service.ts</p>
  
  <pre><code>provinsi():Observable&lt;any&gt; {
  return this.http.get('http://127.0.0.1:8000/api/provinsi').pipe(
  map(this.extractData),
  catchError(this.handleError));
  }
  public extractData(res: Response) {
  let body = res;
  return body || {};
  }
  </code></pre>
  
  <p>restaurant.ts</p>
  
  <pre><code>provinsi() {
      this.pservice.provinsi()
          .subscribe(data =&gt; this.provinsis = data.results);
  }
  </code></pre>
  
  <p>json </p>
  
  <pre><code>{"results":[{"province_id":"1","province":"Bali"},{"province_id":"2","province":"Bangka Belitung"} . . .
  </code></pre>
  
  <p>i need a way to extract my json to angular / ionic view , when i run my apps, still appear "runtime error"</p>