I'm making an AJAX request and I get my object correctly; but there's a problem with some labels, these labels have "-" (sales-price i.e.). So when I want to print in the screen I can't call them properly in my JSX code
render(){
return(
<div>{
this.state.products.map((products)=>{
return <div>
<p>{productt.id}</p>
<p>{productt.name}</p>
<p>{productt.sales-price}</p>
</div>
})
}</div>
}
);
}
If anyone wants to learn more about the object there's some links that could help:
JSON example
Documentation about the API I'm using