How to transfer pictures to a neighboring block?

Need to transfer pictures to the boxes with the corresponding sequence number. How to write it in JQuery?

<div class="box">
 <div class="imgs">
 <img src="https://pp.userapi.com/c850132/v850132551/15eca9/zipCCA8Gldc.jpg">
 <img src="https://pp.userapi.com/c850132/v850132551/15ec94/_wwgNlaY4kY.jpg">
</div>
 <div class="section">
 <div class="block"></div>
 <div class="block"></div>
</div>
 </div>
March 23rd 20 at 19:33
1 answer
March 23rd 20 at 19:35
Solution
$('.box').each((i, n) => {
 const $blocks = $(n).find('.section .block');
 $(n).find('.imgs img').each((i, n) => $blocks.eq(i).append(n));
});
Thank you very much! - maverick.Schumm commented on March 23rd 20 at 19:38

Find more questions by tags jQuery