This worked! Thank you!
I basically used it to open access to all the pages meta, i.e.:
<%*
const fooMeta = DataviewAPI.page(tp.file.find_tfile(foo).path)
%>
some_metadata: <% fooMeta.some_metadata %>
other_metadata: <% fooMeta.other_metadata %>
Works like a charm!