Hi there!
I am trying to filter a list to separate it into two different lists.
I am using a (where list key "in" str) as normal and it works, however, I would need something like (where list str "in" key).
What I mean is that my key is a superset of the string I am looking for, so I want to see if the string is in the key, instead of the key in the string. Is there any way to do this in Hugo?
Bumping this. I have a data template with webmentions for my whole site, and each page filters those to just the ones relevant to the current page. Webmentions are keyed by URLs, but some URLs have fragments. Instead of exact-matches with an “in” operator, having the option for a substring or regex match would make my life a lot easier.
Until then, it looks like plain iteration will be the way to go.
Will do as soon as I replace one of my imperfect where uses with a more robust range+append flow so I have a commit to show the diff as a very clear use-case. Then I’ll use that diff in the issue.