I guess you will need to use some library that can parse html dom and then you go through tags and get back text. Like cheerio.
But please try stackoverflow. If I get it right, this is a generic javascript question. This forum should be just about jsreport.