I am trying to put a transactional email in SendWithUs using jinja
. My data contains a double nest variable.
> { "bookingList": [
> {
> "attendees": [
> {
> "age": "8",
> "name": "Tommy"
> },
> {
> "age": "9",
> "name": "Mila"
> }
> ],
> "classStartTime": "2020-01-30T17:00:00.000Z",
> "classTitle": "Test class",
> "count": "2",
> "price": "10"
> },
> {
> "attendees": [
> {
> "age": "8",
> "name": "Tommy"
> },
> {
> "age": "9",
> "name": "Mila"
> }
> ],
> "classStartTime": "2020-01-30T17:00:00.000Z",
> "classTitle": "Test class 2",
> "count": "2",
> "price": "10"
> } ], "customerInfo": {
> "email": "test@test.com",
> "firstName": "test" }, "orderInfo": {
> "orderId": "64d02680-364d-11ea-981c-42010a2ad1c1",
> "subtotalPaid": "32.09",
> "taxPaid": "3.94",
> "totalPaid": "36.03" }, "subject": "Test 123" }
I am trying to get the data to show
These are your enrollment details:
{{bookingList.attendees.name}}
is enrolled in {{bookingList.classTitle}}
on {{bookingList.classStartTime}}
It is showing the classTitle
and classStartTime
correctly, but is pulling in the word 'name'
instead fo the actual name.
How do you treat double nested variables?