Appradius interview question

Filter an array of objects based on some given id