I am displaying reviews from the Google Maps API. Within my map function I only want to display reviews that are higher than a 1 rating. How can I update my map function to only display reviews where review.rating > 1?
{this.state.reviews && this.state.reviews.map((review, index) => (
<div key={index} className="review">
<p>{review.text}</p>
</div>
))}
if(review.rating ==1) return null;and then just wrap the rest of the JSX in a return statement as well