I want to find out if the document -which is an html file- has "some" tags. If so, I want to get all its attributes.
I tried
var data = require('test.html');
if(data.toLowerCase().indexOf('<iframe') > -1|| data.toLowerCase().indexOf('<iframe>') > -1){
console.log('yeaaah it exist');
// get iframe attributes
}
I was able to find if the tag exist, but how can I get its attributes? Also this is on server side.