Is it possible to compare 2 sets of json objects for a difference? What I have is a script thats polling for JSON object via jquery $post(). What I want to do is take the ob
One potential solution could be to use jQuery's extend. As long as the objects have the same properties, that would work out nicely.
var newJSON = $.extend({},oldJSON,serverData);
Then you would have preserved the old object, and created a new object with any properties from the old object if they aren't present in the new object and overwritten any existing properties with the properties from the new data from the server.