问题
I am trying to send an array in Mailgun email as a list for this I did:
$result = $mgClient->messages()->send(
$this->mailgunDomain,
[
.
.
.
'v:list' => json_encode($finalList),
]);
$finalList
is a 2d array which looks something like this:
[
[
"key" => "someKey"
"value" => "someValue"
],
...
]
But now the main problem is I do not know how can I use this array as handlebars context Because,
I get:
{
"list": "[{"key":"someKey","value":"someValue"}]"
}
I want:
{
"list": [{"key":"someKey","value":"someValue"}]
}
来源:https://stackoverflow.com/questions/63585608/how-to-send-array-in-mailgun-handlebars-context