Can you help me on how to check if object the two objects are equal? here's the two objects that I'm trying to compare...
let obj1 = {"Add Ons": [{"addon_id": 32, "addon_name": "Black Pearl", "addon_price": 15}, {"addon_id": 33, "addon_name": "White Pearl", "addon_price": 15}]}
let obj2 = {"Add Ons": [{"addon_id": 33, "addon_name": "White Pearl", "addon_price": 15}, {"addon_id": 32, "addon_name": "Black Pearl", "addon_price": 15}]}
I tried using this const isEqual = (...objects) => objects.every(obj => JSON.stringify(obj) === JSON.stringify(objects[0]));
to check if it's equal but if the array inside is shuffle it returns false. how to check if it's equal event though in random? thank you so much!