Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Results Summary Component Using CSS Flexbox

@AJarich

Desktop design screenshot for the Results summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


  1. How are you able to print out the data.json information using vanilla Javascript? This is something I've been wondering about.

  2. Any advice on how to make this more streamlined?

Community feedback

@agomez99

Posted

You can use the fetch API

fetch('./data.json')
.then(response => response.json())
.then(data => {
// Access the JSON data here
console.log(data);

// You can iterate over the array and access each object's properties
data.forEach(item => {
console.log('Category:', item.category);
console.log('Score:', item.score);
console.log('Icon:', item.icon);
});
})
.catch(error => {
console.log('Error:', error);
});

Marked as helpful

1

Please log in to post a comment

Log in with GitHub
Discord logo

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