title: Simulate http request
body: <p>So currently im programming a front end application with Angular (not really important) and i have a service which currently provides hard coded json data.</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Observable, of } from 'rxjs';
  import { Client } from '../models/client';
  
  @Injectable({
    providedIn: 'root'
  })
  export class ClientService {
  
    clientsDataMock : Client[] = [    
      {name: "Client A", id: "15", profiles: [
        {name: "profile1"},
        {name: "profile2"},
        {name: "profile3"}
      ]},
      {name: "Client B", id: "20", profiles: [
        {name: "profileX"}
      ]},
      {name: "Client C", id: "25", profiles: [
        {name: "profileY"}
      ]}
    ];
    constructor() { }
  
    getClients(): Observable&lt;Client[]&gt; {
      return of(this.clientsDataMock);
    }
  
    getClient(id : String) : Observable&lt;Client&gt;{
      return of(this.clientsDataMock.find(client =&gt; client.id == id));
    }
  }
  </code></pre>
  
  <p>Currently the observable doesnt really make much sense and before really connecting all this to the backend i want to load all the data from a different file and kinda simulate the ajax calls or http request, which would be implemented later.</p>
  
  <p>Is there a way to simulate this behavior and fetch the data from a seperate file?</p>