NewDash

    Function invoke

    • Invokes the method at path of object.

      Parameters

      • object: any

        The object to query.

      • path: any

        The path of the method to invoke.

      • ...args: any[]

        The arguments to invoke the method with.

      Returns any

      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]
    MMNEPVFCICPMFPCPTTAAATR