How to debug template binding errors for KnockoutJS ?
Replace the template/section will give solution something like:
<div data-bind="text: ko.toJSON($data)"></div>
For slightly more readable version:
<pre data-bind="text: JSON.stringify(ko.toJS($data), null, 2)"></pre>
This will spit out the data that is being bound at that scope and alert you to nesting things appropriately.
Update: as of KO 2.1, Simplify it to:
<pre data-bind="text: ko.toJSON($data, null, 2)"></pre>
Now the arguments are passed on to JSON.stringify.