<script src="//code.jquery.com/jquery-latest.min.js"></script>
<div class="block1">
<div class="block2_1">2_1 раз</div>
<div class="block2_2">
<div class="block1">
<div class="block2_1">2_1 два</div>
<div class="block2_2">
<div class="block1">
<div class="block2_1">2_1 три</div>
<div class="block2_2"></div>
</div>
</div>
</div>
</div>
</div>
<script>
$(function(){
$('.block1').each(function() {
var $data = $(this).clone();
$data.find('.block1').remove();
var data1 = $data.find('.block2_1').html();
//var data2 = $(this).find('.block2_2').html();
alert(data1);
});
$('.block1').replaceWith('<div>replaced</div>');
});
</script>