What if you have objects with different field order? Like { foo: 'bar', baz: 42 } vs { baz: 42, foo: 'bar' }. How do you handle that with JSON.stringify?
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
i think you can use JSON.stringify the both objects then you can compare it !
the only issue here you need to catch JSON.stringify error !
What if you have objects with different field order? Like
{ foo: 'bar', baz: 42 }
vs{ baz: 42, foo: 'bar' }
. How do you handle that with JSON.stringify?