code: func (n *Node) Resolve(path []string) (interface{}, []string, error) {
  	var cur interface{} = n.obj
  	for i, val := range path {
  		switch curv := cur.(type) {
  		case map[string]interface{}:
  			next, ok := curv[val]
  			if !ok {
  				return nil, nil, ErrNoSuchLink
  			}
  
  			cur = next
  		case map[interface{}]interface{}:
  			next, ok := curv[val]
  			if !ok {
  				return nil, nil, ErrNoSuchLink
  			}
  
  			cur = next
  		case []interface{}:
  			n, err := strconv.Atoi(val)
  			if err != nil {
  				return nil, nil, err
  			}
  
  			if n < 0 || n >= len(curv) {
  				return nil, nil, ErrArrayOutOfRange
  			}
  
  			cur = curv[n]
  		case cid.Cid:
  			return &node.Link{Cid: curv}, path[i:], nil
  		default:
  			return nil, nil, ErrNoLinks
  		}
  	}
  
  	lnk, ok := cur.(cid.Cid)
  	if ok {
  		return &node.Link{Cid: lnk}, nil, nil
  	}
  
  	jsonish, err := convertToJSONIsh(cur)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	return jsonish, nil, nil
  }
docs: // Resolve resolves a given path, and returns the object found at the end, as well
  // as the possible tail of the path that was not resolved.