Loop with filter categories

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 %}        
                <a href="{{ site.baseurl }}{{ product.url }}">{{ product.name }}</a>
                        {% for cat_name in product.categories %}
			<a href="{{ site.baseurl }}/categories/{{ cat_name }}/">{{ cat_name }}</a>
			{% endfor %}
                {% else %}
            <p> Error -- Product empty </p>
        {% endfor %}

Did you ever get this to work?