Using Meteor Iron-Router how can I either render data as JSON or simply display it "raw" (without a layout template)
Essentially I want to be able to do something like:
this.route('rawdata', {
path: '/raw/:collection',
layoutTemplate: 'nolayout',
template: 'raw'
})
where /raw/posts would display the raw json of Posts (the collection).
Thanks!
Notes:
I'm aware of JSON endpoint in Meteor But meteor-router is discontinued and Iron-Router does not appear to have a JSON-end-point feature.
I also had a look at https://atmospherejs.com/package/collection-api but it does not suit my needs because I need the ability to select a subset of the fields of the collection/record.