Scalar interview question

Q: Why did i use JSON.stringify to compare two objects instead of checking key & vals manually