Here is an array where objects with the same values for st
and ct
should be considered identical. For example, the first and third objects have the same values for st and ct, so the third object should be filtered out of the final array. How can I achieve this filtering using the array.filter
method? I have reviewed the documentation but I am unsure how to define the conditional for the filter function.
[{
"st": "2012",
"id": "43",
"ct": "1",
"sd": "2"
},
{
"st": "2015",
"id": "45",
"ct": "2",
"sd": "2"
},
{
"st":"2015",
"id": "45",
"ct": "2",
"sd": "1"
},]