function parsePath (path) {
      var str = path.replace(/\[/g, '.[')
        , parts = str.match(/(\\\.|[^.]+?)+/g);
      return parts.map(function (value) {
        var re = /\[(\d+)\]$/
          , mArr = re.exec(value)
        if (mArr) return { i: parseFloat(mArr[1]) };
        else return { p: value };
      });
    }
### .getPathValue(path, object)

This allows the retrieval of values in an
object given a string path.

    var obj = {
        prop1: {
            arr: ['a', 'b', 'c']
          , str: 'Hello'
        }
      , prop2: {
            arr: [ { nested: 'Universe' } ]
          , str: 'Hello again!'
        }
    }

The following would be the results.

    getPathValue('prop1.str', obj); // Hello
    getPathValue('prop1.att[2]', obj); // b
    getPathValue('prop2.arr[0].nested', obj); // Universe

@param {String} path
@param {Object} object
@returns {Object} value or `undefined`
@name getPathValue
@api public