I am building a mobile app for Android and iOS platforms using Titanium Alloy. The mobile app retrieves data from a REST API. The JSON that is returned contains a list of items, each one having a list of comments inside of it. I am trying to create a master/details layout where the list of comments can be seen when an item is selected. How do I map the nested JSON to a model, and how do I refer to nested properties using the data binding syntax?
As far as I can tell I have two options: 1) Filter JSON down to a flat list for the model columns OR 2) Create another collection (CollectionB) for those JSON elements with their own properties and nest CollectionA in CollectionB.
Is there any way I can nest properties within the model columns without creating another collection?