Add docs for group_by and where filters
This commit is contained in:
parent
f1a00a01cf
commit
2f660674c3
|
@ -79,6 +79,32 @@ common tasks easier.
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p class="name"><strong>Where</strong></p>
|
||||||
|
<p>Select all the object in an array where the key has the given.</p>
|
||||||
|
</td>
|
||||||
|
<td class="align-center">
|
||||||
|
<p>
|
||||||
|
<code class="filter">{% raw %}{{ site.members | where:"graduation_year","2014" }}{% endraw %}</code>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p class="name"><strong>Group By</strong></p>
|
||||||
|
<p>Group an array's items by a given property.</p>
|
||||||
|
</td>
|
||||||
|
<td class="align-center">
|
||||||
|
<p>
|
||||||
|
<code class="filter">{% raw %}{{ site.members | group_by:"graduation_year" }}{% endraw %}</code>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<code class="output">[{"name"=>"2013", "items"=>[...]},
|
||||||
|
{"name"=>"2014", "items"=>[...]}]</code>
|
||||||
|
</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<p class="name"><strong>XML Escape</strong></p>
|
<p class="name"><strong>XML Escape</strong></p>
|
||||||
|
|
Loading…
Reference in New Issue