> For the complete documentation index, see [llms.txt](https://lodash.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lodash.shujuwajue.com/array/sorteduniqby.md).

# \_.sortedUniqBy（数组去重）

**语法：**

```javascript
_.sortedUniqBy(array, [iteratee])
```

**源代码链接：**[source](https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L8119)

**npm包链接：**[npm package](https://www.npmjs.com/package/lodash.sorteduniqby)

**描述：**

这个方法类似[`_.uniqBy`](http://www.css88.com/doc/lodash/4.16.1.html#uniqBy)，\_.sortedUniqBy它会优化排序数组。

> 先排序后数组去重

**开始版本：**&#x34;.0.0

**参数：**

* `array (Array)`: 要检查的数组。
* `[iteratee] (Function)`: 迭代函数，调用每个元素。

**返回值：**

* `(Array)`: 返回一个新的不重复的数组。

**例子：**

```javascript
_.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
// => [1.1, 2.3]
```
