Skip to content

Instantly share code, notes, and snippets.

@reggi
Last active December 10, 2015 15:59
Show Gist options
  • Save reggi/4458046 to your computer and use it in GitHub Desktop.
Save reggi/4458046 to your computer and use it in GitHub Desktop.
Mongo Update $or
db.orders.update(
{
$or: [
{"line_items.sku":"TEA-BLCK"},
{"line_items.sku":"TEA-GREEN"},
{"line_items.sku":"TEA-CHAI"}
]
},
{
$set: {
"something":{}
}
},
{
"multi":true
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment