如何在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)
应该非常有效!非常感谢。这正是我所需要的。非常感谢。