JSFiddle - React, Tailwind, and code Playground
JavaScript
const myArray = [[1, 2, 3, 5], [3, 4, 5], [2, 5]].flat();
const deepArray = [1, 1, [2, 2], [[3, [4], 3], 2]].flat()
// then you can access every array element with a simple foreach
myArray.forEach(element => console.log(element))
deepARray.forEach(element => console.log(element))