Equivalent of file.outlinks.file.folder for DataviewJS

What I’m trying to do

Hi! I’m trying to create a list in DataviewJS that is equivalent to this standard Dataview code:

where !contains(file.outlinks.file.folder, "MOCs")

The purpose is to list any files that DON’T contain a link to any file inside a certain folder. (In this case: Any files that don’t link to a file in the MOC folder.)

Things I have tried

I’ve tried code along the lines of

let missingMOC = dv
  .where((b) => !b.file.outlinks.file.folder.includes('"MOCs"'))


but that doesn’t seem to yield the same results. Any advice would be welcome! I’m still trying to find my way around JavaScript. :grin:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.