get unique values of one key value from array of objects 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))];