You are not logged in.
Pages: 1
By mustache template I have fill a javascript array.
Something like this:
var items= [
{{#item}}
{ "ID": {{ID}}, "Title": "{{Title}}", "Kind": {{Kind}}, "Code": "{{Code}}", "Date": "{{Date}}" },
{{/item}}
];
My problem is last item, this item in fact don't need of last comma.
Is there a way to avoid it?
Offline
Trailing commas are allowed in JS and even in JSON starting from ES5 (all modern browser), so this is not a problem IMHO
Offline
Pages: 1