Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.save.find().pretty();
- {
- "_id" : ObjectId("58884b11e1370511b89d8267"),
- "domain" : "google.com",
- "emails" : [
- {
- "email" : "f@google.com",
- "first" : "James",
- "Last" : "fer"
- },
- {
- "email" : "d@gmail.com",
- "first" : "dear",
- "last" : "near"
- }
- ]
- }
- C:MongoDBServerbin>mongoexport.exe -d Trial -c save -o file.csv --type csv --fields domain,emails
- 2017-01-25T12:50:54.927+0530 connected to: localhost
- 2017-01-25T12:50:54.929+0530 exported 1 record
- domain,emails
- google.com,"[{""email"":""f@google.com"",""first"":""James"",""Last"":""fer""},{""email"":""d@gmail.com"",""first"":""dear"",""last"":""near""}]"
- > db.sir.find().pretty()
- {
- "_id" : ObjectId("5888529fa26b65ae310d026f"),
- "domain" : "google.com",
- "emails" : "[{"email":"f@google.com","first":"James","Last":"fer"},{"email":"d@gmail.com","first":"dear","last":"near"}]"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement