Created
December 14, 2017 12:14
-
-
Save Fliktrax/eac7ff885a992a14f63f4622659e2d69 to your computer and use it in GitHub Desktop.
Add subset of one collection to a separate collection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.mailing_entries.aggregate([ | |
{ $match: { subscribed_lists: | |
{ $in: | |
[ | |
"5a325d04f0050c78698b4567", | |
"5822295cf0050c06358b4568", | |
"57acb826f0050c006f8b4567", | |
"57acbf78f0050c0e408b4567", | |
"579a1c61f0050c06528b4589", | |
"579a1c61f0050c06528b4588", | |
"579a1c61f0050c06528b45a2", | |
"579a1c61f0050c06528b4577", | |
"579a1c61f0050c06528b4577"] } } }, | |
{ $out: "temp_mailing" } | |
] | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment