How to display escaped HTML in my JSON data in SendGrid

  Kiến thức lập trình

In the data for my dynamic template is some escaped HTML for a QR Code as a Base64 string. The data could have just included the string, but instead it includes escaped HTML with the tag inside it for displaying the Base64 as an image. Example below.

How can I incorporate this into my dynamic HTML template? When I try to include it like normal data with {{braces}} the HTML is malformed because of the escaping backslashes.

"QRCodes": {
            "P:1302.0.240419.51": "<img src="data:image/png;base64,iVBORw0KGg........Jggg=="/>"
          },

LEAVE A COMMENT