title: How efficiently compare changes in JSON and keep track of it
body: <p>I have a very big nested object(stringify comes 4mb) similar as following which can be 15-20 level deep:</p>
  
  <pre><code>{
    "a": 5,
    "b": {
        "0": 1,
        "1": "x",
        "length": 2
     },
    "x": {
        "a": 1,
        "1": "z"
    },
    "c": {
        "0": 3,
        "1": "Am",
        "3": {
            "0": 3,
            "1": "x",
            "2": {
                "0": 3,
                "1": "Y",
                "length": 2
            },
            "length": 3
        },
        "length": 4
    }
  }
  </code></pre>
  
  <p>After every action on page some property of object gets changed don't know what e.g. above becomes following(see c["3"]["2"]):</p>
  
  <pre><code>{
    "a": 5,
    "b": {
        "0": 1,
        "1": "x",
        "length": 2
     },
    "x": {
        "a": 1,
        "1": "z"
    },
    "c": {
        "0": 3,
        "1": "Am",
        "3": {
            "0": 3,
            "1": "x",
            "2": {z:5,n:"y"},
            "length": 3
        },
        "length": 4
    }
  }
  </code></pre>
  
  <p>I can't store whole object every time as it will overflow the memory. So I want to keep track of changes only.
  So when replaying the action I'll just change that part of object and it will show new object.</p>
  
  <p>Note: I don't want to go with comparison of object in iterative way as that computation will also cost me much as object size is very high.</p>
  
  <p>I'm not getting any heads up how to start on it. </p>
  
  <p>I think some way hashing object properties should help(just like angularJS does in its digest cycle).</p>