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

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