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

318
Views
How can I write to JSON without overwriting the entire file, but instead update a part?

I am making a discord economy bot in javascript. I have a JSON which saves every user's data. The system used is:

  • Save the json in object form to a variable
  • modify the object
  • Overwrite the json with the new data

It works fine, but if 2 users have the file open and both of them edit their copy of the json and then overwrite the json, the second user will overwrite the first user's data. I thought about using a DB but it's too much work to change everything so i wanted to just do something that only modifies the part of the right user, how can i do that?

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