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

172
Vistas
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 Respuestas
Responde la pregunta

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