title: Easiest way to remove nested tags
body: <p>I am looking for the easiest way (coding and execution time) to remove nested tags from a DOM element using javascript.</p>
  
  <p><strong>Example case</strong>: </p>
  
  <pre><code>&lt;i&gt;&lt;b&gt;This &lt;b&gt;&lt;i&gt;is &lt;u&gt;a&lt;/u&gt; new&lt;/i&gt;&lt;/b&gt; test&lt;/b&gt;&lt;/i&gt;
  </code></pre>
  
  <p><strong>Wanted solution</strong>:</p>
  
  <pre><code>&lt;i&gt;&lt;b&gt;This is &lt;u&gt;a&lt;/u&gt; new test&lt;/b&gt;&lt;/i&gt;
  </code></pre>
  
  <p><strong>The solution needs to work generally with all possible html tags and not just for the above example.</strong>
  All nested tags need to be eliminated while keeping the inner HTML in the DOM.</p>
  
  <p>The solution may but doesn't need to use jQuery.</p>
  
  <p>Any suggestions?</p>