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\"]<
You can use this ES6 way to get the desired output
x = ["12,3","3","5","66,22"]; y = []; for (i of x){ y = [...y, ...(i.split(","))] }