Hello, I’m quite new to Obsidian especially to the plugins side. I’m trying to figure out how metadata menu uses values from dataview query.
What I’m trying to do
I’m trying to use every heading 1 of a note as the values for a field. I’m using multi field type, but I imagine it wouldn’t be different with the other supported types. I can already extract the headings, but the problem is to match it with the expected format of metadata menu I believe.
Things I have tried
Here’s where I’m at right now.
const page = dv.page("Test1.md");
var output = []
const content = await dv.io.load(page.file.path);
const lines = content.split('\n');
for (const line of lines) {
if (line.startsWith("# ")) {
output.push(dv.paragraph(line))
} else {
continue;
}
}
dv.list(output)
I’ve also tried using dv.paragraph(output), return output, among others.
Any help would be much appreciated. ![]()