# \_.pullAllWith(array, values, comparator )

URL: https://caijiao.org/lodash/docs/Array/_.pullAllWith
Source: docs/lodash/docs/Array/_.pullAllWith.md
Description: _.pullAllWith(array, values, [comparator]) 该方法与 _.pullAll 类似，但它接受比较器，调用比较器将数组元素与值进行比较。比较器的调用有两个参数： (arrVal, othVal)。

该方法与 [\_.pullAll](/lodash/docs/Array/_.pullAll) 类似，但它接受比较器，调用比较器将数组元素与值进行比较。比较器的调用有两个参数： (arrVal, othVal)。

注意：与[\_.differenceWith](/lodash/docs/Array/_.differenceWith) 不同，该方法会对数组进行变异。

## 自

4.6.0

## 参数

`array (Array)`： 要修改的数组。

values `(Array)`： 要删除的值。

`[comparator] (Function)`： 每个元素调用的比较器。

## 返回值

`(Array)`： 返回数组。

## 示例

```JavaScript
var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];

_.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
console.log(array);
// => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
```
