Vodafone interview question

How to filter an array of objects for example