diff --git a/site/docs/templates.md b/site/docs/templates.md index a4c79184..12ae5d41 100644 --- a/site/docs/templates.md +++ b/site/docs/templates.md @@ -79,6 +79,32 @@ common tasks easier.

+ + +

Where

+

Select all the object in an array where the key has the given.

+ + +

+ {% raw %}{{ site.members | where:"graduation_year","2014" }}{% endraw %} +

+ + + + +

Group By

+

Group an array's items by a given property.

+ + +

+ {% raw %}{{ site.members | group_by:"graduation_year" }}{% endraw %} +

+

+ [{"name"=>"2013", "items"=>[...]}, +{"name"=>"2014", "items"=>[...]}] +

+ +

XML Escape