I have an array called courses[], in this array there are multiple objects. Each object represents a single course.
I'm trying to render out all my object properties for each course. With my current way of doing this I can console.log all my object properties but I'm unsure how I would render it out to the DOM. I tried the following but doesn't render out anything:
<div className="courses">
{
courses.map(course =>
Object.keys(course).forEach((val, key) => {
return <div key={key}>{val}</div>;
})
)
}
</div>
What am I missing here?