0
I will try to be practical. For example, I have the following objects:
let a = {
  'before': 'small',
  'after': 'large',
  'type': 'size'
}
let b = [
  {
    'before': 'small',
    'after': 'large',
    'type': 'size'
  },
  {
    'before': 'large',
    'after': 'small',
    'type': 'size'
  }
]
I need to compare them, but since the second is an array of objects, I need to "dismember" it from that array, so that it’s two other objects, so I compare the three and return the different and the amount of different objects, which in this case is one, but many different cases can come. I don’t know what is the best way to do this, whether it is by transforming into arrays and comparing indices, or whether it has a way to compare as an object.
You have a similar question here, see if it helps you: https://answall.com/questions/291203/howto compared-se-dois-objetos-javascript-s%C3%A3o-equals
– LeAndrade
Help to some extent, the problem starts when I have an array of objects to compare, so I don’t know if it is possible to dismember this array into two objects.
– Felipe Evangelista