I have asked similar question, but this one is about object.
Let say I have 2 objects
firstObject = {0: 1, 1: 2, 2: 3, 4: 4, 4: 5};
secondObject = {0: 5, 1: 4, 2: 3, 4: 2, 4: 1};
I want to know if they contain the same property values, while order and property name is not important. (The function should return true for the example above.) Translating the object to array is NOT an option.
I know I can write a function to sort them and then loop through them to check, but is there a pre-built function for this?
P.S. I have noticed the possible duplicated question, but that post only consider if the object is equal under the same property name, while you can see in my example that I am only considering the property value but not the property names.