@azzykesumaSubmitted about 3 years ago
i don't draw data from Json and instead hardcoding them one by one. any feedback and is greatly appreciated, especially on how to draw data from json to HTML
i don't draw data from Json and instead hardcoding them one by one. any feedback and is greatly appreciated, especially on how to draw data from json to HTML
Hello 👋,
As for you question on how to draw data from JSON to HTML, i suggest you check out the fetch
API that comes with browser, you can fetch the data from JSON in your app.js and render the needed data.
example:
// Replace ./data.json with your JSON feed
fetch('./data.json').then(response => {
return response.json();
}).then(data => {
// Work with JSON data here
console.log(data);
}).catch(err => {
// Do something for an error here
});
For the design, i'm not good with CSS but i say its looks perfect, but it would be better to centered the content for laptop and larger screen size.
Keep on coding 👏