I want to remove duplicates values from list which is inside the dictionary. I am trying to make configurable code to work on any field instead of making field specific.
Input Data :
{'Customer_Number': 90617174, 'Email': [{'Email_Type': 'Primary', 'Email': ['[email protected]', '[email protected]']}], 'Phone_Number': [{'Phone_Type': 'Mobile', 'Phone': [12177218280, 12177218280]}]}
Expected Output Data :
{'Customer_Number': 90617174, 'Email': [{'Email_Type': 'Primary', 'Email': ['[email protected]']}], 'Phone_Number': [{'Phone_Type': 'Mobile', 'Phone': [12177218280]}]}
code tried:
dic = {'Customer_Number': 90617174, 'Email': [{'Email_Type': 'Primary', 'Email': ['[email protected]', '[email protected]']}], 'Phone_Number': [{'Phone_Type': 'Mobile', 'Phone': [12177218280, 12177218280]}]}
res = []
for i in dic:
if i not in res:
res.append(i)
dickeys to thereslist