@core_helper
def dict_list_reduce(list_, key, unique=True):
 new_list = []
 for item in list_:
  value = item.get(key)
  if ((not value) or (unique and (value in new_list))):
   continue
  new_list.append(value)
 return new_list

@ core_helper def dict_list_reduce ( list_ , key , unique = True ) : new_list = [ ] for item in list_ : value = item . get ( key ) if ( ( not value ) or ( unique and ( value in new_list ) ) ) : continue new_list . append ( value ) return new_list
take a list of dicts and create a new one containing just the values for the key with unique values if requested .