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

184
Vistas
"Cannot read" error when trying to access Object's properties

I have this JS Object that contains 3 "thread" objects each with different values. I am trying to get the values from each of the threads. I am able to print the entire json object, but I can't print individual values from them?

My code: console.log(threadArray) returns this in console: (which is perfect) enter image description here

but when I try to replace "threadArray" with "threadArray[0].threads[0]["_id" to get the first thread's ID, it says it Cannot read unknown value.

Does anybody know why?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It's because the object called "threads" is the same as "threadArray[0]" because it IS the first element in the array. You are calling the same object twice. Instead of that log, try using this one:

console.log(threadArray[0]._id);

I hope this helps! I will stay tunned so that you can tell me if it worked

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