Answers for "how to remove second square brackets in an array"

0

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);
Posted by: Guest on March-25-2021

Code answers related to "how to remove second square brackets in an array"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language