🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## sortedLastIndexBy + [link](./sortedLastIndexBy "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L6545 "View in source.") + [npm](https://www.npmjs.com/package/lodash.sortedlastindexby "See the npm package.") ``` _.sortedLastIndexBy(array, value, [iteratee=_.identity]) ``` 这个方法类似 `_.sortedLastIndex`,除了它接受一个 iteratee 调用每一个数组和值来计算排序。iteratee 会传入一个参数:(value)。 ### 参数 1. array (Array) 需要检索的已排序数组 2. value (\*) 要评估位置的值 3. [iteratee=_.identity] (Function|Object|string) 这个函数会处理每一个元素 ### 返回值 (number) 返回 value 应该在数组中插入的 index。 ### 示例 ``` // 使用了 `_.property` 的回调结果 _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x'); // => 1 ```