I'm trying to map through an array within an object in an array that I'm already mapping through. I'm a bit stumped and unsure of whether I can actually do this. How would I map through all roles and give them each their own div? Here's an example of what I've tried:
const Projects = [
{name: 'project one', roles: ['designer', 'developer']},
{name: 'project two', roles: ['designer', 'developer']}
]
{Projects.map((project, i) => (
<div>{project.name}</div>
{project.roles.map((role, i) => (
<div>{role}</div>
))};
))};
Thanks for your help!