title: TypeScript fetch data from API
body: <p>I want the code below to be able to fetch JSON data from a simple API I have set up.</p>
  
  <pre><code>export class FaqFakeDb
  { 
      public static data = fetch('https://#######.co.uk/api/faq/');
  }
  </code></pre>
  
  <p>This is for a FAQ page and its meant to be pulling data from the API. I am new to typescript and Angular so forgive me if I've made a simple mistake.</p>
  
  <p>I want it to function like this:</p>
  
  <pre><code>export class FaqFakeDb
  {
      public static data = [  
          {  
             "id":"1",
             "question":"test1",
             "answer":"test1"
          },
          {  
             "id":"2",
             "question":"test1",
             "answer":"test1"
          },
          {  
             "id":"3",
             "question":"test1",
             "answer":"test1"
          }
       ];
    }
  </code></pre>
  
  <p>Any help will me much appretiated :)</p>