Created
February 3, 2019 09:43
-
-
Save navjotdhanawat/3b37e3f188bd297fb1192d184784d37d to your computer and use it in GitHub Desktop.
Mongodb javascript to insert many document
This file contains 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
var user = [{ | |
username : "navjot", | |
firstname : "Navjot", | |
lastname : "Dhanawat" | |
},{ | |
username : "vitthal", | |
firstname : "Vitthal", | |
lastname : "Hajare" | |
},{ | |
username : "shiva", | |
firstname : "Shiva", | |
lastname : "Sakle" | |
}]; | |
db.Users.insertMany(user); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run:
mongo 127.0.0.1/test mongo.js