Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

127
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!