How to parse the HTML string in jquery?
I have two types of html tags and i want get text from these tags
I am not able select the tag for below given html string
The html is here
<p>
<b><span>22:00</span></b>
<span>
<span>
<b>ABCD</b>
</span>
<b> XYZ</b>
</span>
</p>
<p>
<b><span >06:00</span></b>
<span>
<b>LMNOP</b>
</span>
</p>
and jquery code
$(html).each(function() {
$(this).find('p').each(function() {
$(this).find('b span').eq(0).each(function() {
});
$(this).find('span b').eq(0).each(function() {
console.log($(this).text());
});
});
I want to select ABCD and XYZ in one shot, similarly LMNOP
i.e output should be ABCDXYZ and LMNOP
How can I select this in jQuery?
htmlrepresent? A jQuery object? The page itself?