Get all unique values in JavaScript arrays code example
Example 1: javascript array unique values
var arr = [55, 44, 65,1,2,3,3,34,5];
var unique = [...new Set(arr)]
//just var unique = new Set(arr) wont be an array
Example 2: javascript get unique values from key
const unique = [...new Set(array.map(item => item.age))];