Check out example codes for "mongo restore collections". It will help you in understanding the concepts better.

Code Example 1

mongorestore --port <port> --db <destination database> <data-dump-path/database> --drop

Code Example 2

mongorestore --port 27017 --db restoredTest /mydata/restoredata/test --drop

Learn ReactJs, React Native from akashmittal.com