I have a list of dictionarys which i want to remove duplicates but only if 1 key value is same.
List = [
{Name:"a", age:2},
{Name:"b", age:7},
{Name:"a", age:23},
{Name:"c", age:16},
]
This is my list of dictionarys and i want to sort it and remove duplicates like if i want to do it by name the output should be :
List=[
{Name:"a", age:2},
{Name:"b", age:7},
{Name:"c", age:16}
]
So how can i do it like this. It took the first Name:a because it was unique but when the second Name:a came it counts it as a duplicate and removes it. How can i do this