Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

246
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda