I have an array
Persons:[
{
Name: 'xz',
Job:'abc',
Manager:true},
{
Name: 'xy',
Job:'ac',
Manager:false},
{
Name: 'z',
Job:'a',
Manager:true}
]
I want to filter out the objects for which manager is true and set state i.e. Person_new:[]
with this data using setState
.
Can you help me out with this?