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

120
Views
How to render JSON data as fields in the UI

I have a json data element in a table

<Table responsive>
 <thead>
  <tr>
   <th className="hand" onClick={sort('serialized')}>
    <Translate contentKey="waTpaApp.tpaAssessment.serialized">Serialized</Translate> 
   </th>
  </tr>
 </thead>
<tbody>
 <tr>
  <td>{assessment.serialized}</td>
 </tr>
</tbody>
</Table>

The JSON is displayed in a column called 'Serialized'.

Some of the data looks like this (after formatted)

{
  "app": {
    "determination": {
      "home": {
        "title": "Determinations",
        "createLabel": "Create a new Determination",
        "createOrEditLabel": "Create or edit a Determination",
        "search": "Search for Determination",
        "notFound": "No Determinations found"
      },
    }
   }
}

I would like to display the data in an easy to read way, for example

<Row>
<Col sm="4">
{title}
</Col>
<Col sm="4">
{createLabel}
</Col>
<Col sm="4">
{createOrEditLabel}
</Col>
</Row>

Or more simply

Title -- create label -- create or edit label

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I added some javascript code to parse the data

const data = JSON.parse(assessmentEntity.serialized);

and am able to access it e.g.

<Row>
{data.app.determination.home.title}
</Row>

However I am getting an error when I parse the data and I think it is because the browser needs more time to load the element before parsing it.

SyntaxError: JSON Parse error: Unexpected identifier "undefined"

when I console log the data it appears just fine

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!