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

353
Visualizações
why doesn't my for each iteration work on my array

i have not that much expierience with javascript. in my project I want to iterate over an array, unfortunately it doesn't work and I can't find a solution. in my array are 3 objects see screenshots from console log. after the iteration I want to output the objects individually using a console log. but this does not work.

here the picture of the console:enter image description here

here is my code:

var url;
console.log("All Configs -> ", this.segmenteConfig);
this.segmenteConfig.forEach(segmenteConfig => {
    console.log("used config -> ", segmenteConfig)
    if (segmenteConfig.type === type) {
       url = segmenteConfig.url;
       console.log("used configs url -> ", url);
    }
})
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

In you case this.segmenteConfig is not an array. As shown in the first console statement it is a [__ob__: Observer]. First convert it to normal JS object/array.

Refrence: Vue JS returns [__ob__: Observer] data instead of my array of objects

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