Get the metadata or the frontmatter of the currently open note in Obsidian plugin development. This uses the Obsidian metadata cache.
const noteFile = this.app.workspace.getActiveFile(); // Get the currently Open Note
const metadata = this.app.metadataCache.getFileCache(noteFile);