JavaScript Objects
Conceptually an object is passed to the template and its properties can be used to display the results.
Results are processed in Javascript hence the object passed to the template will be a Javascript object. This has a few benefits:
- If a property is an array type the number of items in the array can be obtained by using the length property of the array.
- Events can be bound to elements.
- Functions can be called to manipulate the data.