const persons = [ {name:"Shirshak",gender:"male"}, {name:"Amelia",gender:"female"}, {name:"Amand",gender:"male"} ] //filter return all objects in array let male = persons.filter(person=>person.gender==='male') console.log(male)