Loop with filter categories

Hello
I would like filtered category from a loop .
My code return nothing when I write this code.
I don’t find any kind of filter to find the right product.categories

My page :slight_smile:`

---
layout: default 

---

<h1>{{ page.categories | capitalize }}</h1>
<ul>{% assign products = site.products[page.categories]   %}
        {% for product in products %}        
            <li>
                <a href="{{ site.baseurl }}{{ product.url }}">{{ product.name }}</a>
                <small>	
                        {% for cat_name in product.categories %}
			<a href="{{ site.baseurl }}/categories/{{ cat_name }}/">{{ cat_name }}</a>
			{% endfor %}
		</small>
            </li>            
                {% else %}
            <p> Error -- Product empty </p>
        {% endfor %}
</ul>`

Did you ever get this to work?