Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
Writing html in json file as value of key

I needed to load external file to my app. type of json. I am needed to read html content like this(the html will be the value):

<div style="font-size:16px; color:red; text-align:center; display:flex">
  <h1 style="some-style">some text</h1>
  <p style="some-style">some text</p>
  <p style="some-style">some text</p>
  <p style="some-style">some text</p>
  <footer style="some-style">some copyrights!</footer> 
</div>

from json like this:

{
"email": {
 "subject": "User registered!",
 "html": {here goes the html block}
  }
}

Every-time I am writing html in json is very difficult to writing because the double quotes. How can if fix it and can writing a right html? There is any generator for this or any solution?

I needed to html for the module nodemailer to send email. I want to read from json because the main idea it's to send for my clients the json file and they can to add any changes with the value and adding the json from outside after that ,as a volume via docker build.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!