title: JSON object - changing a property name for all children recursively
body: <p>I have following json object. </p>
  
  <pre><code>myJsonObj = {  
     "name":"Laptop",
     "type":"hardware computer laptop",
     "forward":[  
        {  
           "name":"Depends On",
           "forward":[  
              {  
                 "name":"test asset 1",
                 "type":"hardware",
                 "link":"somelink"
              }
           ]
        },
        {  
           "name":"somename",
           "forward":[  
              {  
                 "name":"test asset 5",
                 "type":"hardware",
                 "link":"somelink"
              }
           ]
        }
     ],
     "inverse":[  
        {  
           "name":"somename",
           "inverse":[  
              {  
                 "name":"test asset 4",
                 "ciTypeCls":"hardware",
                 "link":"somelink"
              },
              {  
                 "name":"test asset 1",
                 "ciTypeCls":"hardware",
                 "link":"somelink"
              }
           ]
        },
        {  
           "name":"somename",
           "inverse":[  
              {  
                 "name":"test asset 1",
                 "ciTypeCls":"hardware",
                 "link":"somelink"
              }
           ]
        }
     ]
  }
  </code></pre>
  
  <p>I'm trying to change property name <code>forward</code> to <code>children</code>.</p>
  
  <p>Following is my code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>myJsonObj = {
    "name": "Laptop",
    "type": "hardware computer laptop",
    "forward": [{
      "name": "Depends On",
      "forward": [{
        "name": "test asset 1",
        "type": "hardware",
        "link": "somelink"
      }]
    }, {
      "name": "somename",
      "forward": [{
        "name": "test asset 5",
        "type": "hardware",
        "link": "somelink"
      }]
    }],
    "inverse": [{
      "name": "somename",
      "inverse": [{
        "name": "test asset 4",
        "ciTypeCls": "hardware",
        "link": "somelink"
      }, {
        "name": "test asset 1",
        "ciTypeCls": "hardware",
        "link": "somelink"
      }]
    }, {
      "name": "somename",
      "inverse": [{
        "name": "test asset 1",
        "ciTypeCls": "hardware",
        "link": "somelink"
      }]
    }]
  }
  
  jQuery.each(myJsonObj, function(e) {
    e.children = e.forward;
    delete e.forward;
  });
  
  console.log(myJsonObj);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>It does not seem to work , What am i doing wrong ?</p>