I'm really struggling to complete a FullStackOpen exercise that requires rendering data to the page. With the following code, I need to display the number of Parts each Course has and also reduce the number of Exercises/Parts to show the total exercises for each Course.
I'm having difficulty accessing the inside of the Parts array of objects.
{
name: "Half Stack application development",
id: 1,
parts: [
{
name: "Fundamentals of React",
exercises: 10,
id: 1,
},
{
name: "Using props to pass data",
exercises: 7,
id: 2,
},
{
name: "State of a component",
exercises: 14,
id: 3,
},
{
name: "Redux",
exercises: 11,
id: 4,
},
],
},
{
name: "Node.js",
id: 2,
parts: [
{
name: "Routing",
exercises: 3,
id: 1,
},
{
name: "Middlewares",
exercises: 7,
id: 2,
},
],
},
];