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

170
Views
how to map maltivalue json into a table in react

I am new to JSON and react development. So, I don't know the syntax of how to fetch this kind of JSON into the table or map into the table. I am using Fetch API and the method is GET

enter image description here

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

0

After fetching the JSON, set the hospitalAdmin to a State.

    // response is the JSON that you Fetched
    setAdmins(response.hospitalAdmin);

After that, you can just Map over the Array of Admins in the return/render of your Component, like so:

const AdminTable = () => {
    const [admins, setAdmins] = useState([]);
    
    // Code for Fetching Data

    return (
        <table>
            { admins.map((item) => (
              <tr>
                <td>{item.id}</td>
                ...
              </tr>
              )
            }
        </table>
    );
}
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!