JSFiddle - React, Tailwind, and code Playground
by Rejith R Krishnan
HTML
<span class="stats jamie">
<img src="/client/images/icon-ball.gif" alt="Goals" width="13" height="13">
ET:6,ET:10
<img src="/client/images/suboff.gif" alt="Sub-Off" width="13" height="13">
80
<img src="/client/images/subon.gif" alt="Sub-On" width="13" height="13">
ET:1
</span>
CSS
.spacer{height: 3000px; display: block; width: 100%;}
JavaScript
a = {}
a = $('.jamie').find('img').map(function(index){
return {$(this).attr('alt') : $.trim($(this).parent().text()) };
});
console.log(a)