I am new in Meteor, and especially in MongoDB.
I have googled a lot regarding this issue but nothing found related to this.
So there is an app that contains two collections: EventsCollection and RacesCollection and runs on Meteor server.
The RacesCollection has number of records like:
RacesCollection.insert({raceId:"r1", eventId:"e1", raceName:"Moto race 1", status:"statusDetail", mode:"modeDetail"});
RacesCollection.insert({raceId:"r2", eventId:"e1", raceName:"Moto race 2", status:"statusDetail", mode:"modeDetail"});
This is the resultant collection which contains rows having eventId = e1
var race = RacesCollection.find({eventId: "e1"});
Now what i want to do is to simply access the fields of race into javascript, something like race.raceId, race.raceName. How to implement this? Is there any getter method for accessing particular data field?
And how to iterate through multiple rows of race in case it contains number of rows?
Any recommendation will be appriciated.