modules/utils.js
function getPropertyPath(obj, path) {
    "use strict";
    if (!isObject(obj) || !isString(path)) {
        return undefined;
    }
    var value = obj;
    path.split('.').forEach(function(property) {
        if (typeof value === "object" && property in value) {
            value = value[property];
        } else {
            value = undefined;
        }
    });
    return value;
}
function getPropertyPath(obj, path) {
    "use strict";
    if (!isObject(obj) || !isString(path)) {
        return undefined;
    }
    var value = obj;
    path.split('.').forEach(function(property) {
        if (typeof value === "object" && property in value) {
            value = value[property];
        } else {
            value = undefined;
        }
    });
    return value;
}
function getPropertyPath ( obj , path ) { "use strict" ; if ( ! isObject ( obj ) || ! isString ( path ) ) { return undefined ; } var value = obj ; path . split ( '.' ) . forEach ( function ( property ) { if ( typeof value === "object" && property in value ) { value = value [ property ] ; } else { value = undefined ; } } ) ; return value ; }
Retrieves the value of an Object foreign property using a dot-separated
path string.

Beware, this function doesn't handle object key names containing a dot.

@param  Object  obj   The source object
@param  String  path  Dot separated path, eg. "x.y.z"
Retrieves the value of an Object foreign property using a dot - separated path string .