Time Tracking Dashboard

Solution retrospective
It's been a long time since I made the last challenge from FrontEndMentor. It was fun to make.
Still I could not figure out how to use my json file with fetch
and I tried many ways but nothing worked, so I cheated a bit and just created an object containing data.json
Please log in to post a comment
Log in with GitHubCommunity feedback
- @magdaszsz
You fetch it like you fetch from an API. fetch('data.json') .then(res => res.json()) .then(data => console.log(data))
with this snippet you'll see that you're logging the data.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord