Regardless of how many copies of each element you'd like to keep in the array, create a Map by definition Map<Location, number>
and tabulate the number of occurrences of each Location
object. Afterwards, take each element and append it to an array only once.
type Location = {label: string, value: string};
const object: Location[] = [
{ label: "SUA", value: "sua" },
{ label: "SUA", value: "sua" },
{ label: "Florida", value: "florida" }
];
const objects: Map<Location, number> = new Map();
for (const location of object)
if (objects.has(location))
objects.set(location, objects.get(location) + 1);
else
objects.set(location, 1);
const filtered: Location[] = [];
for (const location of objects)
if (location[1] === 1) // You change 1 to any value depending on how many copies of each you'd like.
filtered.push(location[0];
Note This is TypeScript for clarity, but the concept is the same.