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

134
Visualizações
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 Respostas
Responde à pergunta

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