obsidian 日记本倒序汇总 获取标题显示 插件dataviewjs list
// dataviewjs
function removeDuplicate(arr) { return arr.filter((item, index) => { return arr.indexOf(item) === index }) }
const list = dv.pages('"02日记本"').file.lists.map(item => {
return item.link
})
function reverse (arr) {
let oArr = []
arr.forEach(item => {
oArr.unshift(item)
})
return oArr
}
const content = removeDuplicate(list)
dv.paragraph(reverse(content))