//Original array
var multipleBraceArray = "[
[
[-74.026675, 40.683935],
[-74.026675, 40.877483],
[-73.910408, 40.877483],
[-73.910408, 40.683935]
]
]";
//This is the output I am looking for:
var singleBraceArray = [
[-74.026675, 40.683935],
[-74.026675, 40.877483],
[-73.910408, 40.877483],
[-73.910408, 40.683935]
];
答案 0 :(得分:1)
您只是在寻找multipleBraceArray
var multipleBraceArray = [[[-74.026675, 40.683935], [-74.026675, 40.877483], [-73.910408, 40.877483], [-73.910408, 40.683935]]];
var singleBraceArray = multipleBraceArray[0];
console.log(singleBraceArray);

答案 1 :(得分:0)
你有几个错误:
\
字符来表示行结束Array
开头,而不是String
。请尝试使用此代码:
Array