<#list body.result as school_names_list>
{
"NAME": <#if school_names_list.NAME??>"${school_names_list.NAME}"<#else>""</#if>,
"ADDRESS": <#if school_names_list.ADDRESS??>"${school_names_list.ADDRESS}"<#else>""</#if>,
<#if school_names_list?is_last><#else>,</#if>
</#list>
//Here **school_names_list** is a list and we check the last element though **school_names_list?is_last** (where list name is school_names_list)
//In this example, if it the last element, ***we'll avoid adding "," else we add "," as per JSON rules of a list.***