We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
The text was updated successfully, but these errors were encountered:
Alternativally :
var user = map[string]interface{}{ "name": "James", "age": "20", }
input := map[string]interface{}{ "user.name": user[name], "user.age": user[age], }
Thus you are protected from declaring a lot of maps or structs when templating a lot of records.
Sorry, something went wrong.
No branches or pull requests
Is it possible to match a nested map object's key?
For example I having a variable shown below:
Example template
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.
The text was updated successfully, but these errors were encountered: