# Select a categorie in Collection

**URL:** <https://talk.jekyllrb.com/t/select-a-categorie-in-collection/2582>\
**Category:** Help\
**Created:** [February 4, 2019, 1:19pm UTC](https://talk.jekyllrb.com/t/select-a-categorie-in-collection/2582 "2019-02-04T13:19:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lvdesign](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/lvdesign/32/1501_2.png) [@lvdesign](https://talk.jekyllrb.com/u/lvdesign)\
**Post date:** [February 4, 2019, 1:19pm UTC](https://talk.jekyllrb.com/t/select-a-categorie-in-collection/2582/1 "2019-02-04T13:19:22Z")

</div>

Hello,  
I would like what this loop return only the category of the page.categories.  
So I try this assign -\> site.products[page.categories]  
but no result. I don’t find a filter to do this condition

Thanks for and advice

```
 `---

```

## layout: default

# {{ page.categories | capitalize }}

{% assign products = site.products[page.categories] %} {% for product in products %} - {{ product.name }} {% for cat\_name in product.categories %} {{ cat\_name }} {% endfor %} 
 {% else %} 

Error -- Product empty

 {% endfor %}
`
