title: Using FileReader to read a JSON file?
body: <p>I'm trying to read a JSON file I have, uploaded by the user, and try to copy it to an array. However, with a .readAsText(), the return I get has the formatting of a string (obviously), such as including \" and \n and other string-like properties.</p>
  
  <p>Is there a way I can use FileReader (or any other form of reading files, that don't involve a server) to read the JSON file and have it return just the plain JSON?</p>
  
  <p>For example, having it return</p>
  
  <pre><code>[
    {"hello": "world"}
  ]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>[{"hello": "world"}]
  </code></pre>
  
  <p>and not</p>
  
  <pre><code>"[\n{\"hello\": \"world\"}\n]"
  </code></pre>
  
  <p>?</p>
  
  <p>Edit: I am now aware of the JSON.parse(text) method, but I'm getting an error when parsing the FileReader object</p>
  
  <pre><code> let fileUploaded = new FileReader();
   fileUploaded.readAsText(MY_JSON_FILE);
   console.log(JSON.parse(fileUploaded));
  </code></pre>
  
  <p>it returns the error <code>error TS2345: Argument of type 'FileReader' is not assignable to parameter of type 'string'</code></p>
  
  <p>Can I get what i read with FileReader to another var that is a string, and then parse that new var?</p>