const HTMLstring = `
<div>
<div class="wanted"></div>
<div>
<div class="wanted"></div>
</div>
</div>
<div class="wanted"></div>
<div>
<div></div>
<div></div>
<div class="wanted"></div>
</div>`;
$('.wanted', $.parseHTML(`<root>${HTMLstring}</root>`)); // jQuery collection