iterate through an array of objects and get only the object with non-repeating distinct value code example
Example: javascript get unique values from key
const unique = [...new Set(array.map(item => item.age))];
const unique = [...new Set(array.map(item => item.age))];