Skip to content
Discussion options

You must be logged in to vote

Ok so this works! If this could be simplified, I'd be glad to know how.

const pages = await Promise.all(
    dv.pages('"01 notes"')
    .where(p => p.title && p.title.includes("Cuba"))
    .map(page => new Promise(async (resolve, reject) => {
        const content = await dv.io.load(page.file.path);
        resolve({
            link: page.file.link,
            title: page.title,
            content
        });
    }))
);

dv.table(
        ["Note", "Title"],
            pages
            .filter(p => p.content && p.content.includes("Water"))
            .map( p => [
                p.link,
                p.title
            ])
    );

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@erazlogo
Comment options

Comment options

You must be logged in to vote
1 reply
@AB1908
Comment options

Answer selected by AB1908
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants