10 ,
if(data != old){ // data from the server is not same as old
true .
json javascript
https://github.com/prettycode/Object.identical.js
if(!Object.identical(data,old)){ // data from the server is not same as old
:
var a = { x: "a", y: "b" },
b = { x: "a", y: "b" },
c = { y: "b", x: "a" },
d = { x: "Chris", y: "Prettycode.org", developerYears: [1994, 2011] },
e = { y: "Prettycode.org", developerYears: [1994, 2011], x: "Chris" };
f = { y: "Prettycode.org", developerYears: [2011, 1994], x: "Chris" };
console.log(Object.identical(a, b));
console.log(Object.identical(a, c));
console.log(Object.identical(d, e));
console.log(Object.identical(d, f));