# Filter product collection loop with featured products and custom frontmatter

**URL:** <https://talk.jekyllrb.com/t/filter-product-collection-loop-with-featured-products-and-custom-frontmatter/5278>\
**Category:** Help\
**Created:** [November 27, 2020, 2:06am UTC](https://talk.jekyllrb.com/t/filter-product-collection-loop-with-featured-products-and-custom-frontmatter/5278 "2020-11-27T02:06:46Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [November 27, 2020, 6:01am UTC](https://talk.jekyllrb.com/t/filter-product-collection-loop-with-featured-products-and-custom-frontmatter/5278/3 "2020-11-27T06:01:26Z")

</div>

You have also called your collection products and your data products which is confusing.

As the first is accessed as

```auto
site.products

```

And the other as

```auto
site.data.products

```

And if you do have blog posts they are under

```auto
site.posts

```

* * *

Break out your `where` filter to see what is going on there.

Here I leave out the filter and just get one item and view its data.

```auto
{% assign product = site.products | first %}
- Title {{ product.title }}
- Name {{ product.name }}
- Featured: {{ product.featured }}
- {{ product | inspect }}

```

The last will show you all your fields as keys and values

Also remember to set booleans without quotes in YAML

```auto
---
featured: true
---

```

---

_[View the full topic](https://talk.jekyllrb.com/t/filter-product-collection-loop-with-featured-products-and-custom-frontmatter/5278)._
