getAt()

Gets the value under the given root object and path.

This function is valid in v2.8.0 to v2.14.0. This function has been downloaded 41 times.

Parameters

{*} 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.

Returns

{*}
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 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.