Skip to content

Instantly share code, notes, and snippets.

@sreekanthgoud
Created September 27, 2019 22:26
Show Gist options
  • Select an option

  • Save sreekanthgoud/6480e98f966f2bf67e734fb18ec2f8ec to your computer and use it in GitHub Desktop.

Select an option

Save sreekanthgoud/6480e98f966f2bf67e734fb18ec2f8ec to your computer and use it in GitHub Desktop.
Mongodb merge two collections
db.productsTrousers.find().forEach(function(obj){
db.products.insert(obj)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment