I want to compare two Arrays of object
and check the equality with the same properties but different sequences, for example
const array1 = [{id:1,name:'john'},{id:2,name:'wick'}];
const array2 = [{id:2,name:'wick'},{id:1,name:'john'}];
// How can I check if these arrays have the same objects