Mapping colleciton_path

Use case or problem

I would like to map all folders in the collection_path in Zotero. This is no longer possible in V2, as the plugin treats this as a two-dimensional array and does not allow it to be flattened.

Example:
If a document is in these collections:

  • Project1/Subproject1/Phase1
  • Project2/Background/Topic1

Then I would like to have the properties be:

Collections:
- Project1
- Subproject1
- Phase1
- Project2
- Background
- Topic1

Instead, if I use zt.collections | map: "path" then it creates this:

  - - Project 1
     - Subproject1
     - Phase1
  - - Project2
     - Background
     - Topic1

The result is similar when using zt.collections | collections_path | join: "\n- "

Proposed solution

Make it possible to flatten these arrays or to have a variable that includes a list of all folders of the different paths.

Current workaround (optional)

I just use zt.collections | map: "name" which unfortunately gives me less properties.

Related feature requests (optional)

No response

P.S. Is there a way to support this project, buy a coffee or donate? ZotLit hugely shapes my PhD and completely structures my work. Thank you!

I found a workaround by joining the paths into a string and then splitting them up again. Not elegant, but it works.

zt.collections | map: "path" | join: "," | split: ","