Inserting more than one data
Insert too much data, use JS document
DB.Unicorns.Insertmany([{ name: ' horny ', DOB: New Date(1992,2, -,7, -), loves:[' Carrot ',' Papaya '], Weight: -, Gender: ' m ', Vampires: the}, { name: ' Aurora ', DOB: New Date(1991, 0, -, -, 0), loves:[' Carrot ', ' Grape '], Weight: the, Gender: ' F ', Vampires: +}, { name: ' Unicrom ', DOB: New Date(1973, 1, 9, A, Ten), loves:[' Energon ', ' Redbull '], Weight: 984, Gender: ' m ', Vampires: 182}, { name: ' Roooooodles ', DOB: New Date(1979, 7, -, -, -), loves:[' Apple '], Weight: 575, Gender: ' m ', Vampires: About}, { name: ' Solnara ', DOB: New Date(1985, 6, 4, 2, 1), loves:[' Apple ', ' Carrot ', ' Chocolate '], Weight:550, Gender:' F ', Vampires: the}, { name:' Ayna ', DOB: New Date(1998, 2, 7, 8, -), loves:[' Strawberry ', ' Lemon '], Weight: 733, Gender: ' F ', Vampires: +}, { name:' Kenny ', DOB: New Date(1997, 6, 1, Ten, the), loves:[' Grape ', ' Lemon '], Weight: 690, Gender: ' m ', Vampires: the}, { name: ' Raleigh ', DOB: New Date(2005, 4, 3, 0, $), loves:[' Apple ', ' sugar '], Weight: 421, Gender: ' m ', Vampires: 2}, { name: ' Leia ', DOB: New Date(2001, 9, 8, -, -), loves:[' Apple ', ' Watermelon '], Weight: 601, Gender: ' F ', Vampires: -}, { name: ' Pilot ', DOB: New Date(1997, 2, 1, 5, 3), loves:[' Apple ', ' Watermelon '], Weight: 650, Gender: ' m ', Vampires: Wu}, { name: ' Nimue ', DOB: New Date(1999, One, -, -, the), loves:[' Grape ', ' Carrot '], Weight: 540, Gender: ' F '}, { name: ' Dunx ', DOB: New Date(1976, 6, -, -, -), loves:[' Grape ', ' Watermelon '], Weight: 704, Gender: ' m ', Vampires: 165}])
Mongo Shell uses load ("Insertm.js")
19 > load("insertM.js")true20 > db.unicorns.find(){ ..., "name" : "Aurora", "gender" : "f", "weight" : 450 }{ ..., "name" : "Horny", "dob" : ISODate("1992-03-12T23:47:00Z"), ...}{ ..., "name" : "Aurora", "dob" : ISODate("1991-01-24T05:00:00Z"), ... }......21 > db.unicorns.count()13
You can see that 13 data has been inserted