I have array of objects.
let coordinates = [
{ x: 8, y: 1 },
{ x: 8, y: 3 },
{ x: 6, y: 5 },
{ x: 4, y: 6 },
{ x: 3, y: 7 },
{ x: 6, y: 5 },
{ x: 3, y: 3 },
{ x: 1, y: 4 },
{ x: 3, y: 3 }
]
I stumbled upon this blog and this stackoverflow question but it only lets me find duplicates based on one property but I want to get the duplicate objects based on x and y properties like this:
[
{ x: 6, y: 5 },
{ x: 3, y: 3 }
]