Metadata with hyphens?!

I am exploring the use of Fantasy Calendar as a way of keeping events in Obsidian. FC uses the following metadata:
fc-calendar - to identify which calendar the event appears in
fc-date - the starting date of the event
fc-end - thed end date of the event

I’m trying to use dataviewjs to create a list or a table that will show upcoming events. But no matter what I try, the metadata with a ‘hyphen’ seems to not be accessible.

For example:

	.where(t=>t.type == "event")

Results in Evaluation Error: ReferenceError: date is not defined

Is there a way to use YAML metadata that includes a hyphen?


The issue is that if metadata fields are not valid Javascript variable names you will have to use t['fc-date'] instead of t.fc-date in that code.

Thank you

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.