def drop_unlinked(db):
    'This is the nuclear option - use at your own risk!'
    for ds in db:
        ds['exchanges'] = [obj for obj in ds['exchanges'] if obj.get('input')]
    return db
This is the nuclear option - use at your own risk!
def drop_unlinked(db):
    
    for ds in db:
        ds['exchanges'] = [obj for obj in ds['exchanges'] if obj.get('input')]
    return db