I am trying to test two array of objects are exactly equal, tried with toEqual matcher but seems it only works for Array of strings, is there any matcher available in Jest to satisfy the condition. please dont mark this as dulplicate , I didn't find an clear answers.
const arr1 = [{name: 'sam', degree: 'engineer', age: '23'}, {name: 'jane', degree: 'accounts', age: '25'}]
const arr2 = [{name: 'jane', degree: 'accounts', age: '25'},{name: 'sam', degree: 'engineer', age: '23'}]
expect(arr1).toEqual(arr2) // should pass the testcase