i have also same problem ...
i have to to compare two object
first i have to check into two object key if key are same then its value if one object property value are less than another one then it will show me a msg this objects this property value are less.. and its all dynamically..see following my signature..first i will enter one object and its key and value

Object1 = {"Product1":20,"Product2":34,"Product3":44}; // enter and enter another object

Object2 = {"Product2":50,"Product3":45,"Product1":30};

when i will entered that time i will chk first object first property are match to 2nd object first property if not then 2nd object 2nd property it will chk if it match then it will show msg this object this property value is less..please give me suggestion