def filter_by_attribute(data, attribute, required_key):
    """
    Filters by attribute, if value is required_key.
    Example `attribute`: `category`. Example `required_key`: `Permissive`.
    """
    return [entry for entry in data if entry.get(attribute, 'None') == required_key]