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

110
Views
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 answers
Answer question

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 Report
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!