ES2019

ES2019 introduced the Array.prototype.flat() method which you could use to flatten the arrays. It is compatible with most environments, although it is only available in Node.js starting with version 11, and not at all in Internet Explorer.

const arrays = [
      ["12"],
      ["25"],
      ["22"],
      ["$10"]
    ];
const merge3 = arrays.flat(1); //The depth level specifying how deep a nested array structure should be flattened. Defaults to 1.
console.log(merge3);
    


Older browsers

For older browsers, you can use Array.prototype.concat to merge arrays:

var arrays = [
  ["12"],
  ["25"],
  ["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 merged = [].concat(["$6"], ["$12"], ["$25"], ["$25"], ["$18"], ["$22"], ["$10"]);
Answer from Gumbo on Stack Overflow
🌐
TutorialsPoint
tutorialspoint.com › how-to-get-single-array-from-multiple-arrays-in-javascript
How to get single array from multiple arrays in JavaScript
In this step we will use a spread operator, which expands all the elements, and then we will add the expanded element to an array using javascript's predefined method called push. In the code below, we used the rest parameter in the function combineArrays to receive any number of arguments ...
🌐
Educative
educative.io › answers › how-to-merge-arrays-in-javascript
How to merge arrays in JavaScript
In the code above, we have used the spread operator(...) to merge the multiple arrays into a new array. The concat method will merge two or more arrays into a single array and return a new array.
🌐
Medium
medium.com › @revivecoding › convert-nested-array-to-single-array-javascript-tutorial-d1e96fa8de
Convert Nested Array to Single Array | JavaScript Tutorial | by Revive Coding | Medium
August 22, 2022 - Convert Nested Array to Single Array | JavaScript Tutorial For 2-Dimensional Array let arr = [2,3,[4,5],[6,5,8]] let newArr = []function newArray (arr) { for (let i=0; i
🌐
Medium
medium.com › @aamisaul › how-to-convert-multiple-array-of-objects-into-single-array-of-objects-bb4e59548217
How to convert multiple array of objects into single array of objects ? | by Aamisaul | Medium
April 13, 2020 - It’s Simple.First take an variable called finalArray to store our final output.Next thing is to loop the original input. For that take out all the keys from original input using Object.keys.
🌐
Envato Tuts+
code.tutsplus.com › home › javascript
Converting and Transforming Arrays in JavaScript | Envato Tuts+
March 27, 2023 - For example, you may need to reorganize ... to merge multiple arrays into a single array. In many cases, you may need to completely transform an array of objects into another array of completely different objects. In this tutorial, you will learn about the tools JavaScript provides to merge, copy, convert, and filter ...
🌐
Medium
medium.com › @manojsinghnegi › reducing-an-array-of-arrays-a4973deac624
Reducing an Array of Arrays. I was working on one my side project… | by Manoj Singh Negi | Medium
April 24, 2017 - As you can see we use ES5 reduce method of the array to reduce the Array of arrays into a single array. We are taking elem1 on every iteration and appending it to the next elem2 in the array.
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 72466400 › how-can-i-convert-multiple-arrays-to-one-array-in-javascript
How can i convert multiple arrays to one array in javascript - Stack Overflow
Does this answer your question? How to merge two arrays in JavaScript and de-duplicate items Note: answer covers approaches that do not de-duplicate entries including destructuring which would be the "modern" approach: const arr3 = [...arr1, ...arr2];.
🌐
Medium
medium.com › front-end-weekly › flatten-an-array-in-javascript-553d0e7c56b2
Flatten an array in javascript. Learn how to convert a… | by Javascript Jeep🚙💨 | Frontend Weekly | Medium
November 10, 2019 - Flatten an array in javascript Learn how to convert a multi-dimensional array into single dimension array in javascript We can flatten an array to single dimension array using Array.flat(depth) …
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-merge-flatten-an-array-of-arrays-in-javascript
How to Merge/Flatten an array of arrays in JavaScript ? - GeeksforGeeks
July 23, 2025 - The spread operator is used to expand the iterables into separate value and array concat() method is used to merge the arrays into single array.
🌐
CodingTechRoom
codingtechroom.com › question › -convert-array-of-arrays-to-single-array-javascript
How to Convert an Array of Arrays into a Single Array in JavaScript? - CodingTechRoom
Utilizing the `Array.prototype.concat()` and the spread operator to merge arrays. Employing `reduce()` method to aggregate all elements into a single array.
🌐
Educative
educative.io › answers › convert-an-array-of-objects-to-a-single-object-in-javascript
Convert an array of objects to a single object in JavaScript
We loop the array and use the Object.assign() method to convert an array of objects to a single object. This merges each object into a single resultant object.
🌐
freeCodeCamp
freecodecamp.org › news › how-to-merge-arrays-in-javascript-array-concatenation-in-js
How to Merge Arrays in JavaScript – Array Concatenation in JS
November 28, 2022 - You use the concat method of arrays to combine the contents of an array with new values to form a new array.
Top answer
1 of 5
2

arr.flatMap(Object.values).flat() will do the job:

const arr =  [{JUNE: [{"iD": "67854", "event": " closed", "title": "test", "startDate": "2024-06-20", "endDate": "2024-07-25" } ] }, {MAY: [{"ID": "908765", "event": "closed", "title": "test", "startDate": "2024-05-21", "endDate": "2024-06-27" }, {ID: "12345", event: "open", title: "test123", startDate: "2024-05-21", endDate: "2024-06-27" } ] } ];

const result = arr.flatMap(Object.values).flat();

console.log(result)

2 of 5
2

If you don't need the months, but just want to flatten it, flatMap and flat() it :

const arr =  [{JUNE: [{"iD": "67854", "event": " closed", "title": "test", "startDate": "2024-06-20", "endDate": "2024-07-25" } ] }, {MAY: [{"ID": "908765", "event": "closed", "title": "test", "startDate": "2024-05-21", "endDate": "2024-06-27" }, {ID: "12345", event: "open", title: "test123", startDate: "2024-05-21", endDate: "2024-06-27" } ] } ];

const res = arr.flatMap(c => Object.values(c).flat());

console.log(res)


If you want to add the month, thenreduce the array and flatMap each Object.keys with an deeper map for all the events.

const arr =  [{JUNE: [{"iD": "67854", "event": " closed", "title": "test", "startDate": "2024-06-20", "endDate": "2024-07-25" } ] }, {MAY: [{"ID": "908765", "event": "closed", "title": "test", "startDate": "2024-05-21", "endDate": "2024-06-27" }, {ID: "12345", event: "open", title: "test123", startDate: "2024-05-21", endDate: "2024-06-27" } ] } ];

const res = arr.reduce((p, c) => ([ ...p, 
    ...(Object.keys(c)
        .flatMap(month => c[month]
          .map(o => ({ ...o, month })) )) 
        ])
, []);

console.log(res)

Or as an one-liner":

const res = arr.reduce((p, c) => ([ ...p,...(Object.keys(c).flatMap(month => c[month].map(o => ({ ...o, month }))))]), []);