So I have this field contacts.envCon.name
which is inside the Projects collection but when I see them in mongo they are like this:
"envCon" : {
"$ref" : "contacts",
"$id" : ObjectId("5807966090c01f4174cb1714")
}
After doing a simple find based on past ObjectId:
db.getCollection('contacts').find({_id:ObjectId("5807966090c01f4174cb1714")})
I get the following result:
{
"_id" : ObjectId("5807966090c01f4174cb1714"),
"name" : "Terracon"
}
By the way: I'm using Meteor if there is anyway to do this directly with publish/suscribe methods.