Skip to content

Commit ea0bf2d

Browse files
committed
fix braces
1 parent 8845d1a commit ea0bf2d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

filters/where.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: where
33
description: Liquid filter that selects from arrays.
44
---
55

6-
Creates an array including only the objects with a given property value, or any [truthy]({{ "/basics/truthy-and-falsy/truthy" | prepend: site.baseurl }}) value by default.
6+
Creates an array including only the objects with a given property value, or any [truthy]({{ "/basics/truthy-and-falsy#truthy" | prepend: site.baseurl }}) value by default.
77

88
In this example, assume you have a list of products and you want to show your kitchen products separately. Using `where`, you can create an array containing only the products that have a `"type"` of `"kitchen"`.
99

@@ -38,21 +38,21 @@ Kitchen products:
3838
3939
```
4040

41-
Say instead you have a list of products and you only want to show those that are available to buy. You can `where` with a property name but no target value to include all products with a [truthy]({{ "/basics/truthy-and-falsy/truthy" | prepend: site.baseurl }}) `"available"` value.
41+
Say instead you have a list of products and you only want to show those that are available to buy. You can `where` with a property name but no target value to include all products with a [truthy]({{ "/basics/truthy-and-falsy#truthy" | prepend: site.baseurl }}) `"available"` value.
4242

4343
<p class="code-label">Input</p>
4444
{% raw %}
4545
```liquid
4646
All products:
4747
{% for product in products %}
48-
- {% product.title %}
48+
- {{ product.title }}
4949
{% endfor %}
5050
5151
{% assign available_products = products | where: "available" %}
5252
5353
Available products:
5454
{% for product in available_products %}
55-
- {% product.title %}
55+
- {{ product.title }}
5656
{% endfor %}
5757
5858
```
@@ -80,7 +80,7 @@ The `where` filter can also be used to find a single object in an array when com
8080
```liquid
8181
{% assign new_shirt = products | where: "type", "shirt" | first %}
8282
83-
Featured product: {% new_shirt.title %}
83+
Featured product: {{ new_shirt.title }}
8484
```
8585
{% endraw %}
8686

0 commit comments

Comments
 (0)