0

I need a fast way to compare between two objects.

I need the properties whose values changed, and also the properties that were added. Some of the properties have values that are arrays or objects.

Example:

{a: 1, b: "hi",} 

compared with

{b: "hmm", c: 3,}

result:

{b: "hmm", c: 3,}
hmmmm
  • 23
  • 4
  • give us more clarification about the criteria of comparison, based on what? – XMehdi01 Jul 02 '23 at 14:36
  • Please visit [help], take [tour] to see what and [ask]. Do some research, [search for related topics on SO](https://www.google.com/search?q=javascript+diff+nested+objects+site:stackoverflow.com); if you get stuck, post a [mcve] of your attempt, noting input and expected output, preferably in a [Stacksnippet](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/) – mplungjan Jul 02 '23 at 14:42

0 Answers0