function getIn(object, path) {
  if (!path) return NOT_FOUND_OBJECT;
  var solvedPath = [];
  var exists = true,
      c = object,
      idx,
      i,
      l;

  for (i = 0, l = path.length; i < l; i++) {
    if (!c) return {
      data: undefined,
      solvedPath: solvedPath.concat(path.slice(i)),
      exists: false
    };

    if (typeof path[i] === 'function') {
      if (!_type["default"].array(c)) return NOT_FOUND_OBJECT;
      idx = index(c, path[i]);
      if (!~idx) return NOT_FOUND_OBJECT;
      solvedPath.push(idx);
      c = c[idx];
    } else if (typeof path[i] === 'object') {
      if (!_type["default"].array(c)) return NOT_FOUND_OBJECT;
      idx = index(c, function (e) {
        return compare(e, path[i]);
      });
      if (!~idx) return NOT_FOUND_OBJECT;
      solvedPath.push(idx);
      c = c[idx];
    } else {
      solvedPath.push(path[i]);
      exists = typeof c === 'object' && path[i] in c;
      c = c[path[i]];
    }
  }

  return {
    data: c,
    solvedPath: solvedPath,
    exists: exists
  };
}
Function retrieving nested data within the given object and according to
the given path.

@todo: work if dynamic path hit objects also.
@todo: memoized perfgetters.

@param  {object}  object - The object we need to get data from.
@param  {array}   path   - The path to follow.
@return {object}  result            - The result.
@return {mixed}   result.data       - The data at path, or `undefined`.
@return {array}   result.solvedPath - The solved path or `null`.
@return {boolean} result.exists     - Does the path exists in the tree?