在javascript中更改数组结构

时间:2015-03-12 05:23:57

标签: javascript arrays

我想更改我的数组结构,这是我的数组

Array
(
[0] => Array
    (
        [0] => 0.2
        [1] => 0.10
    )

[1] => Array
    (
        [0] => 0.4
        [1] => 0.21
    )

[2] => Array
    (
        [0] => 0.6
        [1] => 0.45
    )

[3] => Array
    (
        [0] => 0.8
        [1] => 0.75
    )

)

我想以这种形式更改此数组: -

([[0.2,0.10], [0.4,0.21],[0.6,0.45],[0.8, 0.75]])

0 个答案:

没有答案