how to remove second square brackets in an array code example
Example: how to remove second square brackets in an array
const data = [
[
{id: 1},
{id: 2}
],
[
{id: 3},
{id: 4}
]
];
const newData = [].concat(...data);
console.log(newData);