I have an array of objects:
var data = [{"monitor":"TFT",
"manufacturer":"MONCORP",
"monID":"1234",
"Delivery Way":"DELIVERY",
"BarCode Text":"Test",
"BarCode Id":"D9",
"Status":"OK"},
{"monitor":"LCD",
"manufacturer":"MONCORP",
"monID":"",
"Delivery Way":"PICKUP",
"BarCode Text":"Dummy Text",
"BarCode Id":"P2",
"Status":"OK"},
{"monitor":"TFT",
"manufacturer":"MONCORP",
"monID":"1234",
"Delivery Way":"DELIVERY",
"BarCode Text":"ONLY TEST",
"BarCode Id":"D9",
"Status":"OK"},
{"monitor":"LCD",
"manufacturer":"MONCORP",
"monID":"1234",
"Delivery Way":"DELIVERY",
"BarCode Text":"FOR TESTING PURPOSE",
"BarCode Id":"D9",
"Status":"OK"},
{"monitor":"TFT",
"manufacturer":"MONCORP",
"monID":"",
"Delivery Way":"PICKUP",
"BarCode Text":"DUMMIEST TEXT",
"BarCode Id":"P7",
"Status":"OK"}];
So I want to take only the objects that are duplicated, BUT I want to distinguish them according to values of keys: monitor, manufacturer, monID, Delivery Way, BarCode Id, Status.
The expected result is:
expected = [{"monitor":"TFT",
"manufacturer":"MONCORP",
"monID":"1234",
"Delivery Way":"DELIVERY",
"BarCode Text":"Test",
"BarCode Id":"D9",
"Status":"OK"},
{"monitor":"TFT",
"manufacturer":"MONCORP",
"monID":"1234",
"Delivery Way":"DELIVERY",
"BarCode Text":"ONLY TEST",
"BarCode Id":"D9",
"Status":"OK"}]