Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Javascript(和/或使用Lodash)中从二维数组中移除数组_Javascript_Arrays_Multidimensional Array_2d_Lodash - Fatal编程技术网

如何在Javascript(和/或使用Lodash)中从二维数组中移除数组

如何在Javascript(和/或使用Lodash)中从二维数组中移除数组,javascript,arrays,multidimensional-array,2d,lodash,Javascript,Arrays,Multidimensional Array,2d,Lodash,我有一个数组 let arr = [ [2, 3], [2, 3] ]; 我尝试使用Lodash.\u uniq函数 let newArr = _.uniq(arr); 但当我这么做的时候 console.log(newArr) 我的成绩仍然很好 [2, 3], [2, 3] 这是我在HTML文件中链接到的CDN "https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js" 我希望newArr仅包含以下

我有一个数组

let arr = [ [2, 3], [2, 3] ];
我尝试使用Lodash.\u uniq函数

let newArr = _.uniq(arr);
但当我这么做的时候

console.log(newArr)
我的成绩仍然很好

[2, 3],
[2, 3]
这是我在HTML文件中链接到的CDN

"https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.min.js"
我希望newArr仅包含以下内容:

[2, 3]

Lodash是否适用于此,或者我是否需要尝试其他方法?

\uqwith(arr,\uu.isEqual)
应该非常有效!非常感谢。这正是我所需要的。非常感谢。