Design comparison
SolutionDesign
Solution retrospective
Added a bit extra to the challenge and changed the code so that "Total this month" changes based on the values entered. Also didnt know how to properly use the JSON file so i just put the data in my app.js file and accessed it there
Community feedback
- @WandolePosted almost 2 years ago
For your JSON file, in plain JS, you can fetch it .
const rep = await fetch('./datas.json'); const datas = JSON.parse(rep) // Or 'const datas = await rep.json()' // I don't know which one is better. Probably the second one if the JSON have a lot of datas // because it would take some time to parse it.
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin 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