How can i convert .outerHTML to .text()

I want to convert item.outerHTML to .text(), Actually I want to convert the html to text, now what do I do ?

$(imgAttr).each(function(index,item) {
 var valImg = $(item).attr("alt");
 if (typeof valImg == typeof undefined || valImg == "") {           
     $(".url-res").append(item.outerHTML.text());
 }

});


Click here view more answers http://ift.tt/1Qdwu4X