Which code should I use on js to map an array with spliting cells yet not reapeating [\"12,3\",\"3\",\"5\",\"66,22\"] into [\"12\",\"3\",\"5\",\"66\",\"22\"]<
[\"12,3\",\"3\",\"5\",\"66,22\"]
[\"12\",\"3\",\"5\",\"66\",\"22\"]<
To throw another onto the pile:
a = Array.from([...new Set(["12,3", "3", "5", "66,22"].flatMap(x=>x.split(",")))]) console.log(a)
if uniqueness wasn't required, then just doing flatMap to the input would be enough