1
0
mirror of https://github.com/balkian/gists.git synced 2024-11-25 02:32:28 +00:00
gists/repos/25131ca85f4f86c8d57c/copyMongo.js
J. Fernando Sánchez 59e5d08d0a Add 'repos/25131ca85f4f86c8d57c/' from commit 'fb3527d971e1d4fefec8d19a3004e239927e388a'
git-subtree-dir: repos/25131ca85f4f86c8d57c
git-subtree-mainline: ae01b4a7e5
git-subtree-split: fb3527d971
2021-10-30 15:13:28 +02:00

1 line
118 B
JavaScript

db.<collection_name>.find().forEach(function(d){ db.getSiblingDB('<new_database>')['<collection_name>'].insert(d); });