I’m trying to print JSON data (this) in React. I came to this:
const print = data.forEach(e => {
e.data.map(el => {
return(
<li>{el.account_id}</li>
)
})
});
return (
<div>
<ul>
{print}
</ul>
</div>
);
Yet it doesn’t work (when i do console.log(el.account_id)
it logs everything, but doesn’t display the data in the ul
). What am i doing wrong?