The opposite of propertys method creates a function that returns the value at a given path of object.
property
object
The object to query.
Returns the new accessor function.
5.0.0
const array = [0, 1, 2]const 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] Copy
const array = [0, 1, 2]const 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]
The opposite of
property
s method creates a function that returns the value at a given path ofobject
.