What I’m trying to do
I’m trying to count the amount of same list property values among the pages.
All pages have list property (called Notes), it is a list of links to created or not created pages (for example - [[aquamor]]).
Things I have tried
Having read the forum, I’ve tried this code
//perfume is an array on 2 items - pages with fronmatter Notes
//Notes is a list of links, both pages have Notes[0]="[[aquamor|aquamor]]"
const perfumes = dv.pages('"нос"').where(f => f.Author=="horhehe");
let saved1, saved2;
//saved1 is a first note of perfume 1
saved1 = perfumes[0].Notes[0];
//saved2 is a first note of perfume 2
saved2 = perfumes[1].Notes[0];
//lets print our notes
dv.paragraph("saved1 = "+ saved1);
dv.paragraph("saved2 = "+ saved2);
//the outcome is two links both named aquamor
//lets compare these two notes we have
dv.paragraph("are they the same? "+(saved1 == saved1));
//the outcome is true, so they are the same
//however for this two inclusion checks
//the outcome should be true and true as I understand it
dv.paragraph("is aquamor in perfume 1? "+perfumes[0].Notes.includes(saved1));
dv.paragraph("is aquamor in perfume 1? "+perfumes[0].Notes.includes(saved2));
//but the outcome is true and false
it produces this outcome
I can’t understand, why the last output is false (and how to write a code where the outcome of checking if a link property is included will be true)