assuming you have two objects that have a decent amount of nesting...
const objA = {
one: {
a: 10,
b: 'string1',
c: {
d: 10
}
},
two : 'string1'
}
const objB = {
one: {
a: 20,
b: 'string2',
c: {
d: 20
}
},
two : 'string2'
}
Is there an easy way to check that all the keys match between them?
*Match: both object have the same keys in the same nested location, there are no extra keys, so objA
and objB
Match