I have following code:
export class Highlights extends React.Component {
render() {
return (
<div>
{JSON.stringify(this.props.highlights_data.data)}
</div>
)
}
}
This prints out the following:
{active:{label:Active,value:12},automatic:{label:Automatic,value:8},waiting:{label:Waiting,value:1},manual:{label:Manual,value:3}}
How can I iterate over the highlights_data.data
props to call another Component passing down label
and value
?