Skip to content

Instantly share code, notes, and snippets.

@JeremyIglehart
Last active June 8, 2016 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeremyIglehart/4ca7e7e400a84203a0e86b74ff18fbb5 to your computer and use it in GitHub Desktop.
Save JeremyIglehart/4ca7e7e400a84203a0e86b74ff18fbb5 to your computer and use it in GitHub Desktop.
This is output from a Meteor Project intended for a stackoverflow.com question

This is output from a Meteor Project intended for a stackoverflow.com question

@Michael Floyd: Here is the output from your suggestion.

".find() and .findOne() format slightly differently in the meteor mongo console, try the latter. Or try db.ideas.findOne(id).score" -

$ meteor mongo
MongoDB shell version: 2.6.7
connecting to: 127.0.0.1:3001/meteor
meteor:PRIMARY> use meteor
switched to db meteor
meteor:PRIMARY> db.ideas.findOne({_id:"bKXXrpYmppFBfq9Kx"});
{
	"_id" : "bKXXrpYmppFBfq9Kx",
	"title" : "Jump through the portal",
	"body" : "The elves from Eldernland should jump through the blue portal mentioned in episode one.",
	"userId" : "W9YEs84QFhZzJeB6j",
	"author" : "Nate Beck",
	"episodeId" : "LbDynnAHxAgM5PPXM",
	"timestamp" : ISODate("2016-06-07T20:37:05.775Z"),
	"votedOnBy" : [
		"W9YEs84QFhZzJeB6j"
	],
	"timesVotedOn" : 5,
	"score" : [
		{
			
		},
		{
			
		},
		{
			
		}
	],
	"overallScore" : 3
}
meteor:PRIMARY> db.ideas.findOne({_id:"bKXXrpYmppFBfq9Kx"}).score;
[ { }, { }, { } ]

As you can see, the output is really being stuborn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment