I have a following code:
<div class="match">
<div class="match-name">MATCH 1</div>
<div class="match-league">LEAGUE 2</div>
</div>
<div class="match">
<div class="match-name">MATCH 2</div>
<div class="match-league">LEAGUE 1</div>
</div>
What I am trying to do is to scrape the data and the output should be an array of objects using this data-model:
{
name: "match-name"
league: "match-league"
}
I am not sure about the scraping part. How to loop through the divs and get the values?