Filter array based on dynamic objects and values in JS

I have an array which contains a list of different objects and I want to be able to re-use the same function to filter different objects and values within the same array. My array cocktailList = [ …