[% USE To %] { "sEcho": [% sEcho %], "iTotalRecords": [% iTotalRecords %], "iTotalDisplayRecords": [% iTotalDisplayRecords %], "aaData": [ [% FOREACH data IN aaData %] { "dt_cardnumber": "[% data.cardnumber %]", "dt_name": "[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = To.json(data.firstname) surname = To.json(data.surname) othernames = To.json(data.othernames) cardnumber = data.cardnumber invert_name = 1%]", "dt_branch": "[% data.branchname |html %]", "dt_action": "Add" }[% UNLESS loop.last %],[% END %] [% END %] ] }