array list unqieu value nodejs code example
Example 1: how to find unique elements in array in javascript
let a = ["1", "1", "2", "3", "3", "1"];
let unique = a.filter((item, i, ar) => ar.indexOf(item) === i);
console.log(unique);
Example 2: javascript get unique values from key
const unique = [...new Set(array.map(item => item.age))];