title: How to get inline or embedded JSON file data
body: <p>Can you please tell me how to get inline or embedded JSON file?</p>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>polyfills.js:3 GET <a href="http://localhost:8100/data/questions.json" rel="nofollow noreferrer">http://localhost:8100/data/questions.json</a> 404 (Not
    Found)</p>
  </blockquote>
  
  <p><strong>Folder path:</strong></p>
  
  <p><a href="https://i.stack.imgur.com/Afazt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Afazt.png" alt="enter image description here"></a></p>
  
  <p><strong>survey-data.ts</strong></p>
  
  <pre><code>    @Injectable()
      export class SurveyData {
  
        constructor(public http: Http) {
  
        }
  
       getJson(): Observable&lt;any&gt; {
          return this.http.get("data/questions.json") //not working here
            .map(this.extractData)
            .catch(this.handleError);
  
        }
  }
  </code></pre>
  
  <p><strong>questions.json</strong></p>
  
  <pre><code>{
      "28903218": {
          "type": "group", 
          "prompt": "Cool, thanks! Now tell us about your child's day:", 
          "description": ""
      }, 
  }
  </code></pre>