[NN]
>> uniques_map = {}
>> for d in list_of_dicts:
>> uniques[dict_hash(d)] = d
>> unique_dicts = uniques_map.values()
[Dave Angel]
> unique_dicts = []
> for d in list_of_dicts:
> if d not in unique_dicts:
> unique_dicts.append(d)
>
> Do it, then decide if performance is
On 01/10/2012 03:24 PM, bruce wrote:
Since dict_hash returns a string, which is immutable, you can now use
a dictionary to find the unique elements:
uniques_map = {}
for d in list_of_dicts:
uniques[dict_hash(d)] = d
unique_dicts = uniques_map.values()
*** not sure what the "uniqes" is, o
trying to figure out how to generate a unique set of dicts from a
json/list of dicts.
initial list :::
[{"pStart1a":
{"termVal":"1122","termMenu":"CLASS_SRCH_WRK2_STRM","instVal":"OSUSI",
"instMenu":"CLASS_SRCH_WRK2_INSTITUTION","goBtn":"CLASS_SRCH_WRK2_SSR_PB_SRCH",
"pagechk":"CLASS_SRCH_WRK2_SS