Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

309
Visualizações
How to display data from different levels inside a nested array in antd table

I want to display data in different levels of the hierarchy in an array in an antd table in react. For example,

{
  employees: [
    {
      id:"II",
      firstName: "first name 1",
      lastName: "last name 1",
      education: [
        {
          year: "2010",
          level: "Bachelors .."
        },
        {
          year: "2013",
          level: "Masters"
        },
      ]
    },
    {
      id:"22",
      firstName: "first name 2",
      lastName: "last name 2",
      education: [
        {
          year: "2010",
          level: "Bachelors .."
        },
        {
          year: "2013",
          level: "Masters"
        },
        {
          year: "2020",
          level: "PHD"
        }
      ]
    } ,
    {
      id:"II",
      firstName: "first name 3",
      lastName: "last name 3",
      education: [
        {
          year: "2010",
          level: "Bachelors .."
        },
        {
          year: "2013",
          level: "Masters"
        },
        {
          year: "2020",
          level: "PHD"
        }
      ]
    } 
  ]
}

in a json like above, if I want to display each education level as a row in the antd table along with other information as follows,

enter image description here

how will I be able to achieve it in antd. Any guidance to solve this will be highly appreciated. Thanks in advance.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

An example is already there in antd documentation https://ant.design/components/table/#components-table-demo-tree-data

Code sandbox example https://codesandbox.io/s/9b6dxf

Key education need to be modified to children and all data related to education year can be inside the child level,

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda