src/validator.js
function getValueAt(dataObject, path)
    {
        if (_.isUndefined(dataObject)) {
            return undefined;
        }
        if (!_.isString(path)) {
            return dataObject;
        }

        var tokens   = path.split('.');
        var property = tokens[0];
        var subpath  = tokens.slice(1).join('.');
        var data     = dataObject[property];

        if (tokens.length > 1 && !_.isUndefined(data))
        {
            return getValueAt(data, subpath);
        } else {
            return data;
        }
    }
function getValueAt(dataObject, path)
    {
        if (_.isUndefined(dataObject)) {
            return undefined;
        }
        if (!_.isString(path)) {
            return dataObject;
        }

        var tokens   = path.split('.');
        var property = tokens[0];
        var subpath  = tokens.slice(1).join('.');
        var data     = dataObject[property];

        if (tokens.length > 1 && !_.isUndefined(data))
        {
            return getValueAt(data, subpath);
        } else {
            return data;
        }
    }
function getValueAt ( dataObject , path ) { if ( _ . isUndefined ( dataObject ) ) { return undefined ; } if ( ! _ . isString ( path ) ) { return dataObject ; } var tokens = path . split ( '.' ) ; var property = tokens [ 0 ] ; var subpath = tokens . slice ( 1 ) . join ( '.' ) ; var data = dataObject [ property ] ; if ( tokens . length > 1 && ! _ . isUndefined ( data ) ) { return getValueAt ( data , subpath ) ; } else { return data ; } }
Given a data object and a path, return the corresponding value
@param  object data A data object
@param  string path A value path with dot notation
@return mixed  Return the value found at path or undefined if value doesn't exists
Given a data object and a path return the corresponding value