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

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

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