code: func (h HashVal) ToMap() map[interface{}]interface{} {
  	mp := make(map[interface{}]interface{}, len(h))
  	for k, v := range h {
  		switch actual := v.(type) {
  		case ArrayVal:
  			mp[k] = actual.ToSlice()
  		case HashVal:
  			mp[k] = actual.ToMap()
  		default:
  			mp[k] = actual
  		}
  	}
  	return mp
  }
docs: // ToMap converts a HashVal to a map.