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

141
Vistas
Why is an Array seen as Object in React Native?

I know this questions has been asked quite some time now, but this behavior is really weird.

I have an Array of Objects (fetched from my Realm Database) with the following structure:

userDates = [{aT: [array], id: "..", ...}, {aT: [array], id: "..", ...}, ...]

I want to filter this array like the following:

const filtered = userDates.filter(x => x.aT.includes("2022-03-01"))

It says "x.aT.includes is not a function". If I run this:

const filtered = userDates.filter(x => console.log(x.aT))

it will print out:

["2022-03-01", "2022-03-02","2022-03-03"]
["2022-03-13", "2022-03-14","2022-03-15", "2022-03-16"]
["2022-04-01", "2022-04-02","2022-04-03"]

"typeof" says: "object" and "Array.isArray" says "false". I'm confused. x.aT is obviously an array.

about 4 years ago · Juan Pablo Isaza
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