How I can access to a returned data of a function with use the reflect package? <p>I have a function of the IndexController type:</p> <pre><code>func (this IndexController) ActionIndex() map[string]string { return map[string]string{"Name": "Hello from the actionIndex()!"} } </code></pre> <p>It is used so:</p> <pre><code>routerInstance := router.Constructor(request) controllerObject := controllers[routerInstance.GetRequestController(true)] outputData := reflect.ValueOf(controllerObject).MethodByName(routerInstance.GetRequestAction(true)).Call([]reflect.Value{}) fmt.Println(outputData) </code></pre> <p>Now for example, how to show the <strong>Name</strong> element of <strong>outputData</strong>? I try to print so:</p> <pre><code>fmt.Println(outputData["Name"]) </code></pre> <p>But program will exit with error:</p> <pre><code># command-line-arguments ./server.go:28: non-integer array index "Name" </code></pre> <p>I will be thankful!</p>