Add docs for group_by and where filters

This commit is contained in:
Parker Moore 2014-05-05 23:37:25 -04:00
parent f1a00a01cf
commit 2f660674c3
1 changed files with 26 additions and 0 deletions

View File

@ -79,6 +79,32 @@ common tasks easier.
</p>
</td>
</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>
<td>
<p class="name"><strong>XML Escape</strong></p>