Convert objects in a javascript multidimensional array to an array

the files in this are SHP coordinates, coordinate reading format [xxxxx,yyyyy], [xxxxxx,yyyyy], how to convert the coordinates in the diagram into the format of a multi-dimensional array. Is there any better way to push, after the for loop?


var ret = arr.map(items => items.map(item => [item.x, item.y]))
console.log(ret)

this may not be a tricky way, either way, the essence is to traverse and add.

Menu