Is there some super new ES JavaScript magic that can achieve this ? (I can write a function to achieve this, was just wondering if any new ES202* technique exists )
let arr = [
['cb', ''],
['cb', '34'],
['cb', '35'],
['rb', '1']
];
/*
Required Output :
[['cb', ['34', '35']], ['rb', '1']]
*/
console.log([...new Set(arr.flat(1))])