Accessing yaml frontmatter of another page/post

Is there a way to access yaml frontmatter of a page/post/collection doc in another doc? like what we can do with data files?

I found an article that explains a similar thing: