If any values of a specific property matches another property in an array, I only want one of them returned.
Meaning I don't want any duplicates. I don't need to return JUST the value of the name property, if the name property matches I want to filter it out of the returned array and keep the objects with differing "name" property values
For example, the spotify album search is returning this:
const array = [{
images: Array(3) [ {…}, {…}, {…} ],
name: "KIDS SEE GHOSTS",
release_date: "2018-06-12",
release_date_precision: "day",
}, {
images: Array(3) [ {…}, {…}, {…} ],
name: "KIDS SEE GHOSTS",
release_date: "2018-06-08",
release_date_precision: "day",
}];
I would like to return an array of objects that have unique values for the "name" property.