The data file is already hosted together with the other files, though! You can see it at https://memominguez.github.io/results-summary-component/data.json
.
On your computer, you can't fetch the file straight from the disk, so you'll need a tool that provides a dev server, such as Vite or Live Server. With Vite, you can import the JSON file as if it was another JS file: import json from './data.json'
.
Marked as helpful