I have a relatively simple query
TABLE WITHOUT ID
notes_root AS "Parent for",
length(notes_root.parents) AS count,
"test" AS one_else_col
WHERE file.name = this.file.name
FLATTEN
map(
file.inlinks,
(x) => choice(contains(join(x.parents), this.file.name), x, "")) AS notes_root
SORT length(notes_root.parents) DESC
its result
Please tell me - what would the code of the same query look like in dataviewjs?
The main points of the query:
- Extract inlinks to the CURRENT note
- working with properties
- sorting
- Return table, 1 value = 1 row, with 3+ columns
- the 2nd column is calculated based on the values (links) from the first
I really tried to look at the dvjs guides myself - and unfortunately the bulk of the examples are based on extracting notes from folders and/or do not return a row-by-row table
P.S.: Why do I want to switch to js? Because the functionality of dataview is sorely lacking in basic things, up to the point of not being able to comment on the code normally