https://blog.camel.dev/posts/javascript-two-dimensional-array-to-one-dimensional-array/