Invokes the method at path of object.
path
object
The object to query.
The path of the method to invoke.
The arguments to invoke the method with.
Returns the result of the invoked method.
5.7.0
const object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }invoke(object, 'a[0].b.c.slice', [1, 3])// => [2, 3] Copy
const object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }invoke(object, 'a[0].b.c.slice', [1, 3])// => [2, 3]
Invokes the method at
path
ofobject
.