def replace_dots(obj):
    """Recursively replace '.' by '•' in dictionary key names, to avoid mongodb
    error.
    """
    return {k.replace('.', '•'): replace_dots(v) for k, v in obj.items()} \
        if isinstance(obj, dict) \
        else obj