Please note that I don’t know javascript. I managed to patch the code after multiple google searches so I apologize if there is something rather obvious that I’m overlooking.
I tried all possible bracket combinations but each time it yields the same error. When I omit the brackets containing both the return statements it yields (Unexpected Identifier return) and when I omit any one of them it simply yields (Unexpected Identifier) Tried Omitting the first colon as well but to no avail.
What I’m trying to do
I wanted to filter a query in dataviewjs using multiple conditions so I used the following syntax:
@joethei Ah man, you just beat me to it. I figured out a solution of my own by using the intersection of two different arrays.
var x = dv.pages('"Personal Space/Documentations"').filter(function(f) {return f.file.path.indexOf('windows-commands') === -1;}).file.link
var y = dv.pages('"Personal Space/Documentations"').filter(function(f) {return f.file.name.indexOf('Index') === -1}).file.link
var intersection1 = y.filter(value=>x.includes(value))
and then passing dv.list on intersection1. My solution may not be the best, but it works for now. Thanks for your reply.