I have a list in python that looks like this...
[
{
"title": "Green Jacket",
"price": "18",
"instock": "yes",
},
{
"title": "Red Hat",
"price": "5",
"instock": "yes",
},
{
"title": "Green Jacket",
"price": "25",
"instock": "no",
},
{
"title": "Purple Pants",
"price": "100",
"instock": "yes",
},
]
I am trying to remove items from the list that have duplicate names, so in the example above the final list would look like this...
[
{
"title": "Green Jacket",
"price": "18",
"instock": "yes",
},
{
"title": "Red Hat",
"price": "5",
"instock": "yes",
},
{
"title": "Purple Pants",
"price": "100",
"instock": "yes",
},
]
Is converting to a dict going to help me in this instance?