function get(object, path) {
    if (memoGet[path]) {
        return new Error("circular reference for " + path);
    }
    var parts = path.split(".");
    var obj = object;

    while (typeof obj === "object" && obj && parts.length) {
        var part = parts.shift();
        if (!(part in obj)) {
            return new Error("invalid path");
        }
        obj = obj[part];
    }
    memoGet[path] = true;
    // The replace can cause a circular reference
    var value = replace(obj, object);
    delete memoGet[path];
    return value;
}
function get(object, path) {
    if (memoGet[path]) {
        return new Error("circular reference for " + path);
    }
    var parts = path.split(".");
    var obj = object;

    while (typeof obj === "object" && obj && parts.length) {
        var part = parts.shift();
        if (!(part in obj)) {
            return new Error("invalid path");
        }
        obj = obj[part];
    }
    memoGet[path] = true;
    
    var value = replace(obj, object);
    delete memoGet[path];
    return value;
}
function get ( object , path ) { if ( memoGet [ path ] ) { return new Error ( "circular reference for " + path ) ; } var parts = path . split ( "." ) ; var obj = object ; while ( typeof obj === "object" && obj && parts . length ) { var part = parts . shift ( ) ; if ( ! ( part in obj ) ) { return new Error ( "invalid path" ) ; } obj = obj [ part ] ; } memoGet [ path ] = true ; // The replace can cause a circular reference var value = replace ( obj , object ) ; delete memoGet [ path ] ; return value ; }
Get the value of a json object at a given path
@param {Object} object Container object
@param {String} path Path, delimited by dots
@return {Object} value
Get the value of a json object at a given path