Display subdocuments of collection in pagination


#1

I’m trying to display data from my collection based on search criteria and paginate the results. I’m using alethes:pages package for pagination. The problem is that my collection consists of subdocuments and it’s being displayed as Object. I want to retrieve it’s values.
Following is my HTML code:

{{> flights}} {{>pages}} {{>pagesNav}}

Current Output :
totalFlights: [object Object]
flightNumber: 2
commuter:

JSON Collection structure:
{“totalFlights”:[{“vdsFlight”:{“flightNo”:“2”,“deptAirportCode”:“AAA”,“arrAirportCode”:“BBB”,“deptTime”:“2015-05-30 11:15 CEST”,“arrTime”:“2015-05-30 19:50 CEST”},“acsFlight”:null}],“flightNo”:“2”,“commuter”:false}.

Please help me print the contents of totalFlights instead of Object.

Thanks


#2

at least show us template helper
BTW when u query that find in brwoser in console, you can see exact structure to realize properties.
And from these you can see how to get to exact values.
So decide which of these values you want to show and if all you need to prepare few templates to show them in a loop.


#3

The problem is since I’m using the package for pagination, i am not able to change the templates. The templates for {{>pages}} and {{>pagesNav}} are defined in the source code of package. I am new to meteorjs and do not know much. Any help would be appreciated.