I've been looking into single page apps and started with Marionette.js today. I found that the overall structure of the application is very effective (modules, events, etc) i can not get into idea how to use templates(views) to get most of them when using complicated data structures. i am used to handlebars-like templates that can do some additional logic and nesting.
What are the best practices to display nested templates?
Consider this not so complex data structure with nested data:
[{name:"John", addresses:
[
{street:"John Street",city:"New York, NY"},
{street:"John Street",city:"Madrid, PA"}
],
notes: [{note:"note1"},{note:"note2"}]
},
{name:"Alex", addresses:
[
{street:"Alex Street",city:"New York, NY"},
{street:"Alex Street",city:"Madrid, PA"}
],
notes: {}}
]
How to effectively render first-level array as table rows and inner arrays (like "addresses" and "notes") into individual columns in the row (in form of another table, for example).