I have an array, which looks like this:
const persons = [ { name: \"Joe\", animals: [ {species: \"dog\", name: \"Bolt\"}, {species: \"c
This should do the trick
persons.filter((person) => { return person.animals.filter((animal) => { return animal.species === 'cat'; }).length > 0; });
Add the check on length, as filter returns an array, not a boolean.