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

135
Vistas
Using Find is only giving me first 16 digits of an ID correctly

I have an array of items. They are in a FlatList in React Native (not super important). I'm trying to use the find method on the array to find the matching object of the selected item. When i get the matching object, the ID that I'm looking for is only correct up to the first 16 digits. The last 3 digits are always 0's

       onPress={key => {
                    let selGame = projects.find(game => {
                        return game.key === key
                    })
                    console.log(selGame, 'selGame.ID') // {title:'title', ID:1234567891011123000}
                 
                }}

console returns:

{ title:'title', ID:1234567891011121000 }

expect console to return:

{ title:'title', ID:1234567891011121314 }

this occurs with multiple IDs for my Games. Any help would be much appreciated

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

The reason why your code doesn't work is because the number is too big. Most systems don't like numbers that big, and they just mess up the number. To get it to work, the easiest way would be to convert it into a string.

about 4 years ago · Santiago Trujillo 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