I have to compare two unsorted arrays of objects, for example the following code should return true:
compareObjs(
    [{ foo: 'foo', bar: 'bar' }, { baz: 'baz' }], 
    [{ baz: 'baz' }, { foo: 'foo', bar: 'bar' }]
)
I know there are already plenty of answers about comparing arrays of objects, but I did not really find the clear one for comparing the unsorted version of arrays.
 
     
     
     
     
     
    