Closed 9mm closed 3 years ago
Is there a way I can apply a diff like in this library:
a = { a: '10', b: '20', c: '30', }; b = { a: '10', b: '40', }; delta = getDiff(a, b); c = applyDiff(a, delta); console.log(c); // Output: {a:'10', 'b':40}
I'm looking to quite simply send an object to a JSON api of only keys/items that changed. I don't need all this diff RFC extra information as I'm not going to reverse it, I just need to send only changed fields in the API
nevermind that doesnt actually do what i want either
Is there a way I can apply a diff like in this library:
I'm looking to quite simply send an object to a JSON api of only keys/items that changed. I don't need all this diff RFC extra information as I'm not going to reverse it, I just need to send only changed fields in the API