Are you asking me to explain js?
I can’t do that because my knowledge in JS is zero.
I read your code and understand some steps, but in a very basic way (for example: I don’t know how “let”, “for”, “const” works; I don’t understand why you need the length; I don’t understand for (let i = 0; i < length; i++; …). But I deduced your goal.
This is an insecure statement, but maybe your code have a problem with the fact that file.inlinks is by default an array and you try to verify a condition in “link” as if the link is a string…
But this is guessing…
Sorry but I can’t explain more (because it’s js stuff)
The inverse? in dvjs or dql?
Taking the previous query, I think you just need to add a “!” before the filter condition, i.e., the “negation” of that condition: