I need a function that filters a list of dictionaries with key-value pairs without hardcoding the key-value filter. The filter parameter may have either one key-value filter