I have some blocks with properties like this:
block content
start-date:: [[2022-04-18]]
end-date:: [[2022-05-01]]
Then I have a query where I get the start dates of the blocks on the current page:
{:query [:find (pull ?b [*])
:in $ ?current-page ?today
:where
[?b :block/page ?p]
[?p :block/name ?current-page]
[?b :block/properties ?props]
[(get ?props :start-date) ?start-date-prop]]
:inputs [:current-page :today]}
Now, I would like to get the page that is contained in the :start-date
property, like so:
{:query [:find (pull ?b [*])
:in $ ?current-page ?today
:where
[?b :block/page ?p]
[?p :block/name ?current-page]
[?b :block/properties ?props]
[(get ?props :start-date) ?start-date-prop]
;; want to get the journal-day of the start-date property
[?start-date-prop :page/journal-day ?start-date]]
:inputs [:current-page :today]}
However it looks like this property is just a string, not a page (or a list of pages in the event that I had written multiple start dates). Is there a way to get the page(s) out of it? So that "[[2022-04-18]]"
is treated as a page within the query, and I can get its :page/journal-day
?