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

166
Visualizações
how to get data in nesting array in object in array in object

I want need to get some data in the Data array

I also using new Array type things but not things how to get

const Data = [
      {
        title: "About me",
        subtitle: "for more details",
        description:
          "Lorem, ipsum dolor sit amet consectetur adipisicing elit.",
  },

  {
    progressBar_forntend: [
      {
        progress_title: "html",
        width: "85%",
      },
      {
        progress_title: "css",
        width: "72%",
      },
    ],
  },
];

I want this type of data

Data.map((e)=>{
console.log(e.progressBar_forntend.progress_title)
})

but is not work

I need to get data by using the map method

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

0

Your outermost array has two objects, one without and one with "progressBar_forntend". So, I filter first for the objects that has "progressBar_forntend". Second, "progressBar_forntend" is itself an array. Finally I use flat() to flatten the nested array of titles.

const Data = [{
    title: "About me",
    subtitle: "for more details",
    description: "Lorem, ipsum dolor sit amet consectetur adipisicing elit.",
  },
  {
    progressBar_forntend: [{
        progress_title: "html",
        width: "85%",
      },
      {
        progress_title: "css",
        width: "72%",
      }
    ]
  }
];


let filtered = Data.filter(dataitem =>
  Object.keys(dataitem).includes('progressBar_forntend'));

result = filtered.map(item =>
  item.progressBar_forntend.map(item => item.progress_title));

result = result.flat();

console.log(result);

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