Reputation: 2105
I would like to "stringify" the object what the sendgrid template received. With other words, How can I use an unknown structured object with the sendgrid template.
Example:
My object:
{"test": {"foo": { "bar": {"foo2": "bar2"}}}
My sendgrid template:
... what is inside the test object: {{ test }}
And the result is:
... what is inside the test object: [object Object]
However I would like to something like this:
... what is inside the test object: {"foo": { "bar": {"foo2": "bar2"}}}
Is it possible somehow?
Upvotes: 0
Views: 64
Reputation: 14
TEST DATA:
{"test": {"foo": { "bar": {"foo2": "bar2"}}}}
HTML:
{{test.foo.bar.foo2}}
Render:
bar2
Upvotes: -1