Q:

Replace elements with corresponding elements in array

I need to replace divs with .status class with new refreshed divs without touching any other elements. I use response data of a ajax call to get the new divs.
<div class="wrap">
    <div class="item-23">
        <div class="title">
        ...
        <div class="status">
        ...
    </div>
    <div class="item-451">
        <div class="title">
        ...
        <div class="status">
        ...
    </div>
    <div class="item-3">
        <div class="title">
        ...
        <div class="status">
        ...
    </div>
</div>

This is what I have so far. I am able to get the array with the new divs like this:
function( response_data ) {
    var $html      = $.parseHTML( response_data );
    var $new_divs  = $( '.status', $html ); // refreshed divs are now in array
}

But then I don't know how to replace the old ones with the new ones in the manner that I need.
I did try $( '.status' ).replaceWith( $new_divs ); but that replaces each old div with a copy of all new divs. Not what I wanted.
How do I replace each old div.status with only its corresponding new div?

A:

Ok, I actually managed to come up with a working solution.
It was sufficient to just use current index of .each loop on the target node list. Here is the final code in case anyone would have a similar problem.
function( response_data ) {
    var $html      = $.parseHTML( response_data );
    var $new_divs  = $( '.status', $html );
    var $old_divs  = $( '.status' );

    $.each( $new_divs, function( i ) {
        $( $old_divs ).eq( i ).replaceWith( this );
    });
}

