I have 2 different javascript object :
key = {
id : 3,
name : "Leroy",
class : "A",
address : "IDN",
age : "17"
}
and ...
answer = {
id : 3,
class : "A",
name : "Leroy",
age : "17",
address : "IDN"
}
What I wanted to do is to compare answer object with key object using (===) or (==) and will return true, even when the answer object key order is mixed, but as long as the value within each key is the same, it will still return true.
The condition will return false if one of the key in answer object and its value is not present, or there is a new key and value set inside the answer object.
Any help would be appreciated!