I am trying to output a HTML list in JSX.
Here is how I build the array:
let seasonsList = [];
for (var i=0; i < jsonData.data.campaigns.list.length; i++) {
seasonsList.push(<li key={i}>{jsonData.data.campaigns.list[i].name}</li>);
}
When I try to output this list I get nothing inside the ul tags
return (
<ul>{seasonsList}</ul>
);
How can I output the list of names inside the ul tags?