Here is the structure of my array:
const arr1 = [
{
"Param1": "20",
"Param2": ""8",
"Param3": "11",
"Param4": "4",
"Param5": "18",
"Param6": "20",
"Param7": "8"
},
{
"Param6": "21",
"Param7": "8",
"Param8": "11",
"Param9": "4",
"Param10": "18"
},
{
"Param1": "20",
"Param2": "8",
"Param3": "10"
}
]
I need to remove duplicate key-value pairs in the objects.
The expected output should be:
arr1 = [
{
"Param1": "20",
"Param2": "8",
"Param3": "11",
"Param4": "4",
"Param5": "18",
"Param6": "20",
"Param7": "8"
},
{
"Param6": "21",
"Param8": "11",
"Param9": "4",
"Param10": "18"
},
{
"Param3": "10"
}
]
I want an array with unique key-value pairs in each object. How can I achieve this?