The object to query.
The path of the method to invoke.
Rest
...args: any[]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]
Invokes the method at
path
ofobject
.