How to get tags[] non-dominantly appended?

Currently if you use the tags filter operator, it dominantly appends. This basically means that the list that is created eliminates all duplicates. I need to keep duplicates so I can count them. Is there a workaround to collecting a list of tags?

Thanks!

Try something like

[all[tiddlers]get[tags]enlist-input:raw[]]

By default, the get[...] filter operator keeps duplicates. Then, enlist-input:raw[] “unpacks” each of the tags fields that were retrieved, using the :raw suffix to retain duplicates.

So, for example, if you want to know how many tiddlers on https://TiddlyWiki.com are using the “Language” tag you could write:

{{{ [all[tiddlers]get[tags]enlist-input:raw[]match[Language]count[]] }}}

Note that, for this use-case, the same result can also be achieved using:

{{{ [all[tiddlers]tag[Language]count[]] }}}

-e

1 Like

Thanks Eric! I think that will do the trick.

Depending on your particular application, the = filter run prefix might also help. It appends the output of the filter run without de-duplication. See https://tiddlywiki.com/#Filter%20Expression for more information.
Have a nice day
Yaisog