> 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/util/propertyof.md).

# \_.propertyOf

**语法：**

```javascript
_.propertyOf(object)
```

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

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

**描述：**

[`_.property`](https://lodash.com/docs/4.17.10#property)的反相版本。 这个方法创建的函数返回给定 path 在`object`上的值。

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

**参数：**

* `object (Object)`: 要检索的对象。

**返回值：**

* `(Function)`: 返回新的函数。

**例子：**

```javascript
var array = [0, 1, 2],
    object = { 'a': array, 'b': array, 'c': array };

_.map(['a[2]', 'c[0]'], _.propertyOf(object));
// => [2, 0]

_.map([['a', '2'], ['c', '0']], _.propertyOf(object));
// => [2, 0]
```
