i have this example:
<td "class=name">
<span class="removed">one</span>
<span class="added">two</span>
</td>
or maybe this:
<td class=name> one
<span class="removed">two</span>
<span class="added">three</span>
</td>
or even this:
<div>
one
<span class="added">two</span>
three four
<span class="removed">five</span>
six
</div>
and I aim to transform it with JavaScript (no JQuery) into this:
<td "class=name">
two
</td>
or possibly something like this:
<td class=name>
one
three
</td>
or perhaps this:
<div>
one
two
three
four
six
</div>
I am struggling to find a solution. I've only come across many jquery solutions like replaceWith, but I require plain javascript for this task.