title: Read local JSON file in typescript
body: <p>How can I read a locally stored JSON file into a variable in typescript? I have a json file of photos that looks like this:</p>
  <pre><code>[
      {
        &quot;id&quot;: 1,
        &quot;camera&quot;: &quot;&quot;,
        &quot;location&quot;: &quot;&quot;,
        &quot;iso&quot;: 0,
        &quot;aperture&quot;: 0,
        &quot;focal length&quot;: 0
      },
      {
        &quot;id&quot;: 2,
        &quot;camera&quot;: &quot;&quot;,
        &quot;location&quot;: &quot;&quot;,
        &quot;iso&quot;: 0,
        &quot;aperture&quot;: 0,
        &quot;focal length&quot;: 0
      },
      {
        &quot;id&quot;: 3,
        &quot;camera&quot;: &quot;&quot;,
        &quot;location&quot;: &quot;&quot;,
        &quot;iso&quot;: 0,
        &quot;aperture&quot;: 0,
        &quot;focal length&quot;: 0
      }
  ]
  </code></pre>
  <p>I'm trying to read the file as text and then use <code>Json.Parse</code> but how do I read it as text in the first place? I've tried using FileReader.readAsText but it only accepts blob objects. Do I need to create a blob object from my filepath or is there a easier way to read local JSON files?</p>