Skip to content

Instantly share code, notes, and snippets.

@afuggini
Last active October 15, 2015 19:46
Show Gist options
  • Save afuggini/6412f51b3d1629923f6b to your computer and use it in GitHub Desktop.
Save afuggini/6412f51b3d1629923f6b to your computer and use it in GitHub Desktop.
How do I insert a new key:value set under one of the objects inside AdTagNames in MongoDB?
{
"_id" : ObjectId("541945c1a5b1e41035b49ed7"),
"AdTagNames" : [
{
"adURL" : "http://www.sdfadgs.com",
"adPASSBACK" : "http://google.com/passback.html",
"adTAGS" : [
"sdfgsdfgsdfg"
]
},
{
"adURL" : "http://www.sdfg.com",
"adTAGS" : [
"sdfsfsadgfsd"
]
}
]
}
@afuggini
Copy link
Author

User.update({
  _id: xxx,
}, {
  ???
});

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