title: deleting a Dynamic nested element in JSON message using Java Script
body: <p>We are looking for a sample code to delete the nested element in JSON message using Java Script. This element name will be getting dynamically from other function. </p>
  
  <p>Path to delete :</p>
  
  <pre><code>privateNetwork.floor.block.network.name
  </code></pre>
  
  <p>We are sure the following will work on hard coding:</p>
  
  <pre><code>delete jsonobj[privateNetwork][floor][block][network][name]
  </code></pre>
  
  <p>But how to achieve this for a dynamic scenario.<br>
  e.g: in the second try if we need to delete <code>privateNetwork.floor.room</code>.</p>