Skip to content

Nested object in map[string]interface{}. #25

Description

@happyjian97

Is it possible to match a nested map object's key?
For example I having a variable shown below:

input := map[string]interface{}{
  "user": map[string]interface{}{
	  "name": "James",
	  "age":  "20",
  },
}

Example template

"Hi, my name is {{user.name}}, I'm {{user.age}} years old."

How do I get the {{user.name}} as the tags for template when calling ExecuteStringStd() ? I tried with {{user.name}} but it doesn't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions