FileReader API is cool but yeah, it needs user interaction. No way around that for security reasons.
If you’re building something quick and dirty, you could just paste the JSON directly into your JS file as a variable. Not scalable, but gets the job done.
Otherwise, local server is the way. Here’s how to do it with Node:
```bash
npx http-server
```
Then access your file at `http://localhost:8080/data.json`. Easy peasy.
If you’re building something quick and dirty, you could just paste the JSON directly into your JS file as a variable. Not scalable, but gets the job done.
Otherwise, local server is the way. Here’s how to do it with Node:
```bash
npx http-server
```
Then access your file at `http://localhost:8080/data.json`. Easy peasy.
