Skip to content

Instantly share code, notes, and snippets.

@kartikag01
Created December 17, 2017 20:45
Show Gist options
  • Select an option

  • Save kartikag01/6df7d242cc81bfbdc5d820cf1ea7a0e1 to your computer and use it in GitHub Desktop.

Select an option

Save kartikag01/6df7d242cc81bfbdc5d820cf1ea7a0e1 to your computer and use it in GitHub Desktop.
Mongo Output for lookup query
{
"_id" : ObjectId("5a36ce46f7a13634daf1214c"),
"name" : "Jayden",
"created_at" : ISODate("2017-12-14T12:49:01.746+0000"),
"subscriptions" : [
{
"_id" : ObjectId("5a36ce84f7a13634daf1214e"),
"user_id" : ObjectId("5a36ce46f7a13634daf1214c"),
"topic" : "nodejs"
},
{
"_id" : ObjectId("5a36ceaaf7a13634daf12150"),
"user_id" : ObjectId("5a36ce46f7a13634daf1214c"),
"topic" : "mongodb"
}
]
}
{
"_id" : ObjectId("5a36cec2f7a13634daf12152"),
"name" : "Olivia",
"created_at" : ISODate("2017-12-15T12:49:01.746+0000"),
"subscriptions" : [
{
"_id" : ObjectId("5a36cec2f7a13634daf12152"),
"user_id" : ObjectId("5a36cec2f7a13634daf12152"),
"topic" : "java"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment