// Converts array with multiple values into a single array with all items: var merged = [].concat.apply([], arrays);