code: func nextKey(key string) string {
  	fieldLen := strings.IndexAny(key, ".[")
  	if fieldLen == -1 {
  		return key
  	}
  	return key[:fieldLen]
  }
docs: // Break on dots and brackets.
  // e.g. bar => "bar", bar.baz => "bar", bar[0] => "bar"