jsondiffpatch
jsondiffpatch copied to clipboard
[Question] Is there a way to return the difference?
Is there a way to return just the difference between two objects, so when I have two objects (just as example) that looks like this:
const source = { name: 'My name', street: 'My street', interest: 'football' };
const compareTo = { name: 'Other name', street: undefined, interest: 'football' };
I would get a return object that looks like this:
const result = { name: 'Other name', street: undefined };