Here is the HTML that I am loading into cheerio:
<p class="selectionShareable"><strong><a href="https://www.shiftpowerforpeace.org/en/digital-inclusion/digital-fund/">Shift Power for Peace Digital Fund</a></strong><br><strong>Type of project</strong>: This fund is designed to support access the digital tools needed to continue peace building work, even remotely, during the period of lockdown and restrictions brought about by COVID-19. This fund is primarily for the purchase of phone credit, basic equipment, software and other communications tools.<br><strong>Location: </strong>selection is based on the 2019 Fragile State Index<br><strong>Eligibility: </strong>Any individual, group or organization that meets the following criteria can apply: must be carrying out peace building work in a fragile or conflict affected country for a minimum of six months, defined as any activities that have a strong direct impact on peaceful outcomes in a community; must refuse to use violence or weapons in their work, and embraces the concept of non-violence, is engaging in locally or nationally focused work and must not be a branch of an international organization. <br><strong>Grant size</strong>: Between $50 and $750. Total fund value is $100,000 <br><a class="button-red" href="https://www.shiftpowerforpeace.org/en/digital-inclusion/digital-fund/" target="_blank">APPLY HERE</a></p>
How can I use the selector to get the title and url in this case?
axios(url).then((response) => {
const html = response.data;
const $ = cheerio.load(html);
$('.selectionShareable p').each((index, element) => {
const title = $(element).first().children().first().text();
const link = $(element).first().children().first().attr('href');
})
}).catch(err => console.log(err));