Infosys interview question

Asked to write small code to filter the list of Custom Objects.