This is my redux state:
people: [
{
id: 1,
name: 'John',
weight: 4500000,
category: 'employee',
brand: 'sony',
sport: 'baseball',
country: 'NZ'
},
{
id: 24,
name: 'Frank',
weight: 7210000,
category: 'admin',
brand: 'sony',
sport: 'basketball',
country: 'Australia'
},
{
id: 10,
name : 'George',
weight: 5800000,
category: 'admin',
brand: 'samsung',
sport: 'basketball',
country: 'NZ'
}
]
I want to filter by multiple parameters and combine these filters, so every time I add a condition the results narrow or expand.
For example, if I want the people who play basketball from NZ, then I would obtain the complete object with id 10.
Then, if I remove the country filter I would obtain the id 10 and 24
What's the way of doing it?
Any idea on how to do it?
Thanks in advance