Get pages with specific link in property

Hello, I would like to return the pages which would have a link in their property but I block. I have a list property ied_ec_academic_year. Inside, some notes contain a text, others one or more links. What I want is to return the pages that contain 2024 in their link.

This dv.pages(GLOBAL_VARS.sourcePages).where(p => p.ied_ec_academic_year) returns the relevant pages. But I can’t find how to say that of these notes. I only want the one whose ied_ec_academic_year matches 2024. I’ve tried cascading where, some, foreach. In short, I can’t find it out. I always end up with one of the notes that bug the script because my ied_ec_academic_year property doesn’t only contain links.

I finally found. I don’t know if there’s anything cleaner, but it seems to work.

dv.pages(GLOBAL_VARS.sourcePages)
    .where(p => p.ied_ec_academic_year)
    .where(p => p.ied_ec_academic_year.some(link => link.path && link.path.includes(GLOBAL_VARS.filename))).file.name.values;

however, I don’t understand why the .some() doesn’t work in my 1st .where.