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

115
Vistas
JSON data printing issue in react-js

This is my JSON Data

const Paper = [{ Head: "<strong>Heading Content</strong>sub-heading", content: ["sample texts...."] }];

And i try to print this data to my page it working but it show like <strong>Heading Content- </strong>subheading

{Paper.map((Paper) => (
  <div className='news-papper'>
    {Head}
  </div>
))}

I wand " Heading Content- subheading " How to print data like this?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You need to specify the property Head of Paper object, and don't forget to name the array Papers with (s) at the end, since it'is an array contains many Paper.

{Papers.map((Paper) => (
  <div className='news-papper' dangerouslySetInnerHTML={{__html: Paper.Head}}/>
))}

PS: Papers's not in format JSON, instead it is an array of object in JS.

about 4 years ago · Juan Pablo Isaza Denunciar
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