trim dynamic_keys via list comprehension