Merge/flatten an array of arrays
You can use concat to merge arrays: var arrays = [ [“$6”], [“$12”], [“$25”], [“$25”], [“$18”], [“$22”], [“$10”] ]; var merged = [].concat.apply([], arrays); console.log(merged); Using the apply method of concat will just take the second parameter as an array, so the last line is identical to this: var merged2 = [].concat([“$6”], [“$12”], [“$25”], [“$25”], … Read more