I'm creating a dynamic template in SendGrid. I want to change the color of a field based on a field in my case Success.
For example, this is my json
.
{
"Environment": "[DEV] ",
"RunAtTime": "09/06/2020 11:29:02 +01:00",
"Status": "Success",
"OrganisationId": "6",
"OrganisationName": "Test",
"InvoiceId": "2",
"InvoiceRef": "Acme Ltd., A1 Taxis",
"Amount": "50.00"
}
Following the documentation, I tried to do something like
{{#if this.Status = 'Success'}}
#00b300
{{else}}
#ff0000
{{/if}}
I found example only for boolean field.
My goal is to change the text color based on a field. What is the best way to do that?