Gets the value under the given root object and path.

This function is valid in v2.8.0 to v2.24.2. This function has been downloaded 42 times.


{*} root
Object to start at as the root of the proposed path.
{Array} path
An array of strings and/or numbers that represent the path to be traversed under root.
{*=} opt_defaultValue Optional, Default:undefined
The value to be returned if the given path doesn't fully exists under root.


If path is an empty array root will be returned. Otherwise either the value found under the given path starting at root or opt_defaultValue if the path doesn't fully exist under root.

Required Function

This function directly requires the following function which is included automatically:

  • testAt()
    Tests a given path under the given root object and returns the values at each step of that path.

Requiring Functions

This function is directly required by the following functions:

  • bindCompare()
    Creates a compare function which binds the namespaces within the two given objects.
  • countBy()
    Creates or augments an object, making new properties that correspond to values in the given array. Each property added will indicate how many items in the array corresponding to those property names.
  • minIndex()
    Get the index of the (first) minimum value in an array.