Hi there~
I made two collections ‘users’ and 'posts’
in posts existing collections of data with the name “regId”, which is taken from _id collections ‘users’ as reference
this is JSON in mongo
‘posts’
{
"_id" : ObjectId(“57e67f0ad94b51ba8fdee839”),
“title” : “How to mongoimport and not use ObjectId in the _id fields”,
“contents” : “good”,
“regId” : DBRef(“users”, ObjectId(“57e7bce77c705856d323263b”)),
}
‘users’
{
"_id" : ObjectId(“57e7bce77c705856d323263b”),
“username” : “Josh”,
“email” : "bhw0506@gmail.com",
“password” : “Qus900506”,
“profile” : {
“username” : “Josh”,
“from” : “kakao”,
“friends” : [
DBRef(“users”, ObjectId(“57e7bce77c705856d323263b”))
],
“groups” : [
],
"company" : "Google",
"department" : "development"
}
}
and I brought it up like this in meteor
Template.Feed.helpers Feeds: ->
return posts.find()
and I use this one on template
{{regId.username}}
of course it was wrong
I want to get the name of data, how to bring it up?
plz help me~