But while inlinks are working fine. In backlinks, I see duplicates.
Let’s say I have a Baby_note. I mention it once in a Mamy_note and twice in a Dady_note. Also, inside Baby_note I talk once about Crayons_note, and twice about Cars_note. This is what I get.
But I don’t know JavaScript, so… Anyone willing to help?
By the way, is there any good place to learn JavaScript for as limited use, as for Obsidian Dataview? I mean I’d like to know some basics, but every time I try, I get kind of overwhelmed, since computer science is totally not my department.
Someone can offer good advice on that but in the meantime…
If you had taken your problem to a better chat bot, it would have done it within two tries (I fed the solution from the linked place and some pertinent part of the Dataview docs):
Wanting to set alphabetical order on these was a little trickier, but with some prodding (offering ideas from the forum, or actually, in this case, from my own computer notes), I managed to work it out:
`$= Array.from(new Set(dv.current().file.inlinks.filter((value, index, self) => index === self.findIndex(t => t.path === value.path)))).sort((a, b) => a.path.localeCompare(b.path))`
`$= Array.from(new Set(dv.current().file.outlinks.filter((value, index, self) => index === self.findIndex(t => t.path === value.path)))).sort((a, b) => a.path.localeCompare(b.path))`
So you were on the right track but didn’t follow it through.
Best of luck
You’re right. Chatbots writing code…, I have yet to register, they already exist.
Still, they probably wouldn’t be so kind to even sort it for me alphabetically, just out of kindness It works perfectly. And when I’ve got the answer served on a gold platter, it even kinda makes sense. Thank you very much.
Hi again, there is one little quirk about this solution that I didn’t notice before. It is not essential to me (and i don’t know how to change it - obviously), but I thought I’ll mention it here, if someone expected it. All the links show as existing files even if they don’t. I mean, you see non existing pages as a thin text for a split second, and then they all render in a bold typeface.