Example 1: unique array javascript es6 Map
const data = [
{ group: 'A', name: 'SD' },
{ group: 'B', name: 'FI' },
{ group: 'A', name: 'MM' },
{ group: 'B', name: 'CO'}
];
const unique = [...new Set(data.map(item => item.group))];
Example 2: javascript array unique values
var arr = [55, 44, 65,1,2,3,3,34,5];
var unique = [...new Set(arr)]
Example 3: javascript find unique values in array
var myArray = ['a', 1, 'a', 2, '1'];
var unique = myArray.filter((v, i, a) => a.indexOf(v) === i);
Example 4: array unique values javascript
const myArray = ['a', 1, 'a', 2, '1'];
const unique = [...new Set(myArray)];
Example 5: unique values in array javascript
let uniqueItems = [...new Set(items)]
Example 6: javascript get unique values from array
const myArray = [1,2,3,1,5,8,1,2,9,4];
const unique = [...new Set(myArray)];
const myString = ["a","b","c","a","d","b"];
const uniqueString = [...new Set(myString)];