DataviewJS don't find more 2 fields

1. DataviewJS don’t find more 2 fields:

1
2

  1. But this code will work:
let pages_list = dv.pages("#pj");

dv.span(pages_list.pj_main.states.status);

How resolve this problem without edit Frontmatter block?

Problem solved. Not all pages ("#pj") had keys “states” and “status”. In this situation, you should do this

dv.pages("#pj").where(p => {if (p.el_main) {if (p.el_main.states.status == "P") {return p;}}});
1 Like

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