const getGroups = [
{ id: 52, data_type: "Prices & Volumes,Holdings,Reference Data" },
{ id: 51, data_type: "Prices & Volumes,Holdings,Reference Data" },
{ id: 49, data_type: "Fundamentals,Holdings,Corporate Actions,Reference Data" },
{ id: 25, data_type: "Holdings,Corporate Actions,Reference Data" }
];
const values = getGroups.map(item => item.data_type.split(','))
const sets = new Set([].concat(...values))
const array = Array.from(sets)
you need to know why and how, or your lean nothing...that's bad.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…