{% contentchannelitem where:'ContentChannelId == 21 && StartDateTime <= "{{ 'Now' | Date }}"' sort:'StartDateTime desc' securityenabled:'false' %}
{% assign closeCurly = '}' -%}
{%- capture seriesJSON -%}
{%- for item in contentchannelitemItems -%}
"Id": {{ item.Id | ToJSON }},
"Title": {{ item.Title | ToJSON }},
"Summary": {{ item | Attribute:'Summary' | ToJSON }},
"ImageId": {{ item | Attribute:'SeriesImage','RawValue' | ToJSON }},
"MessageCount": {{ item.ChildItems | Size | ToJSON }}
{% if forloop.last %}{{ closeCurly -}}{% else %}{{ closeCurly | Append:', ' -}}{%- endif -%}
{% endcontentchannelitem %}
<Rock:FromJson x:Key="Series">
{}{{ seriesJSON | XamlWrap }}