What I’m trying to do
I am trying to get an overview of all the inline variables (or variables in general i guess (including YAML frontmatter)), as well as the information within those variables.
I want an overview and to see where i can re-align my variable naming conventions so i’m more organised.
I can easily get this working with tags… but struggling with inline. I am not familiar with dataviewjs really, so any further explanation of what is going on would be appreciated.
Tags
Provides list of every tag in repository
```dataviewjs
let tags = [];
for (let tag of dv.pages().file.tags) {
if (tags.indexOf(tag) == -1) {
tags.push(tag);
}
}
dv.list(tags);
```
I would like list of every inline variable and associated value
Things I have tried
```dataviewjs
// Step 1: Access content and test regex matching
// Select a single page (adjust the path to match one of your pages)
let page = dv.page("Daily Notes/2024-03-15.md");
// Check if we can access the page content
if (page && page.file.content) {
dv.paragraph("Content Accessed Successfully.");
// Test regex on this content
const regex = /\[([^\]]+)::|\(([^\)]+)::/g;
let match;
let matchesFound = false;
while ((match = regex.exec(page.file.content)) !== null) {
dv.paragraph("Match found: " + match[0]);
matchesFound = true;
}
if (!matchesFound) {
dv.paragraph("No matches found. Check regex and content format.");
}
} else {
dv.paragraph("Page content not accessible or page does not exist.");
}
```
Thanks in advance.