0

How to find the difference between two objects.

I have two const

const initialData = { Phases: [ { PhaseName: '44', Comment: '44', Servers: [ { ServerName: '44', Comment: '44', IP: '44', User: '44', PwdEncrypted: '44444', }, ], }, { PhaseName: '55', Comment: '55', Servers: [ { ServerName: '55', Comment: '55', IP: '55', User: '55', PwdEncrypted: '55', }, ], }, ], };

const initialData2 = { Phases: [ { PhaseName: '66666', Comment: '44', Servers: [ { ServerName: '44', Comment: '44', IP: '44', User: '44', PwdEncrypted: '44444', }, ], }, { PhaseName: '55', Comment: '55', Servers: [ { ServerName: '55', Comment: '55', IP: '55', User: '55', PwdEncrypted: '55', }, ], }, ], };

I only want to see the difference "66666"

Andrei K
  • 9
  • 3
  • 1
    Check this old question https://stackoverflow.com/questions/8572826/generic-deep-diff-between-two-objects – abdul Aug 17 '22 at 07:31
  • Very thanks i use https://www.npmjs.com/package/deep-object-diff – Andrei K Aug 17 '22 at 12:46
  • Does this answer your question? [Generic deep diff between two objects](https://stackoverflow.com/questions/8572826/generic-deep-diff-between-two-objects) – Ivan Shumilin Aug 17 '22 at 22:54

0 Answers0