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

195
Views
Can anyone recommend the best way to calculate the diff between two objects in a way that can be applied to generate either object from the other?

Assume I have two different complex objects, a and b, which can each contain other objects or arrays. I want to get the diff of a and b in a way that I can 'apply' that patch to a to get b, or 'apply it in reverse' to b to get a. In other words, I want to be able to make a round trip, no matter how complex either object.

The reason I need this is that I want to be able to return to the various states of a record in a database over time. Every time the record changes, I want to store a patch, and I want to be able to play through the patches forward or backward to get to any previous state of that record.

Any help would be greatly appreciated.

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!