After searching through the forum here I still can’t find the answer so had to make a new post. Sorry if this is previously asked.
I want to make a table of all the meeting notes where the yaml array “attendees” includes, lets say “Person A”.
With regular dataview I am able to to this with:
WHERE contains(attendees, "Person A")
However, I would like to filter notes in the same way (“array contains”) with a dataviewjs in a templater template but can’t figure out how. Since it is an array the regular .where(p => p.attendees ===“Person A”) does not work.
Could anyone give me a tip on how I could add the filter yaml array “attendees” includes “Person A” to the dataviewjs query below:
The question mark is needed to avoid errors if/when the attendees field is missing. With the question mark the code gracefully exits that statement, whilst without it it would cause dereferencing a null value (which is no good).