i wanted to loop through the array inside on an object and pull the data to render in the react component. but i don't know how to use map to the array inside on the object. i tried many way's but it's not working
const [emailData, setEmailData] = useState("");
res?.data.emails.map((email) =>
setEmailData(
<Table.Row>
<Table.Cell>{email.emailed_to}</Table.Cell>
<Table.Cell>{email.notes}</Table.Cell>
<Table.Cell>{email.created_at}</Table.Cell>
</Table.Row>
);
);
return ({ emailData });