Getting a page list from 2 categories

Hello,

I’m trying to generate a list of pages that belong to two categories. This is important for me since I plan to have subcategories with the same name. In analogy to cars:

Audi              <-- section
    Car name A    <-- post.md (categories = ["Audi", "4WD"])
    Car name B    <-- post.md (categories = ["Audi", "Cabriolet"])
BMW               <-- section
    Car name C    <-- post.md (categories = ["BMW", "4WD"])
    Car name D    <-- post.md (categories = ["BMW", "Cabriolet"])

Based off the docs I came up with this pseudocode:

<ul>
{{ range and (where $.Site.Pages ("Params.categories" "Audi"))
             (where $.Site.Pages ("Params.categories" "4WD")) }}

    <li>{{ .Title }}</li>
             
{{ end }}
</ul>

Can someone help me come up with the correct code for this use case? Thanks!

Can someone help me with this? Even a snippet that shows me how to use where to get posts from one category would be very helpful.

Sorry to bump this, but it’s important for me because my Hugo is so slow due to inefficient code, but I can’t make the presumably more efficient where work.