const data = [{
id: 1,
Group: 'A',
Name: 'SD'
}, {
id: 2,
Group: 'B',
Name: 'FI'
}, {
id: 3,
Group: 'A',
Name: 'SD'
}, {
id: 4,
Group: 'B',
Name: 'CO'
}];
let unique = [...new Set(data.map(item => item.Group))];
console.log(unique);
Expecting only return district array object in the data 0 index value should not return again as it does already have same group and name value.
https://jsfiddle.net/k3p7xfcw/
Thank You
2
Answers
You can try Unique by multiple properties ( Group and Name )
https://jsfiddle.net/G2jakhmola/qutranps/1/
using JS array filter