服务器

Array

Collection

Date

Function

Lang

Math

Number

Object

Seq

String

Util

Properties

Methods

_.propertyOf(object)

与之相反_.property; 这个方法创建一个函数,返回给定路径的值object

以来

3.0.0

参数
  1. object (Object):要查询的对象。
返回

(函数):返回新的存取函数。

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]