how to apply filter on array in react code example
Example: filter array react
<div>
{people.filter(person =>
person.age < 60).map(filteredPerson => (
<li>
{filteredPerson.name}
</li>
))}
</div>
<div>
{people.filter(person =>
person.age < 60).map(filteredPerson => (
<li>
{filteredPerson.name}
</li>
))}
</div>