title: RXJS calling a JSON file that updates every 30 seconds
body: <p>I have a JSON file with GPS coordinates. This file updates every 30 seconds subsequently updating the latitude and longitude coordinates. I currently have a service grabbing the link to my API but whenever the API reloads after 30 seconds it causes an error in mine console saying the coordinates haven't been called.</p>
  
  <p><strong>This is how I'm calling the link to my API.</strong></p>
  
  <pre><code>getFirstDevice() {
  if (! this.data) {
    return this._http.get(this.busFeed).pipe(
      map((data: Response) =&gt; this.data  = data),
      tap(data =&gt; console.log('Server info: ' + JSON.stringify(data)))
     );
  } else {
    return this.data;
  }}
  </code></pre>
  
  <p>I'd imagine i need to use a different operator than map in this instance? Absolutely any suggestions would be amazing.</p>