[DOCS-4134] Comment on: "manual/tutorial/getting-started-with-the-mongo-shell.txt" Created: 07/Oct/14  Updated: 03/Nov/17  Resolved: 07/Oct/14

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Done Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

MongoDB shell version: 2.4.7

Location: http://docs.mongodb.org/manual/tutorial/getting-started-with-the-mongo-shell/
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; .NET4.0E; rv:11.0) like Gecko
Referrer: http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0CC4QFjAC&url=http%3A%2F%2Fdocs.mongodb.org%2Fmanual%2Ftutorial%2Fgetting-started-with-the-mongo-shell&ei=MuIzVJ2PGYX_yQSVnIKQCA&usg=AFQjCNHTzEwDiItr24WvzPsJB3FSii4Urg&bvm=bv.76943099,d.aWw
Screen Resolution: 1778 x 1000
repo: docs
source: tutorial/getting-started-with-the-mongo-shell


Participants:
Days since reply: 9 years, 19 weeks, 1 day ago

 Description   

MongoDB shell version: 2.4.7
connecting to: ds039960.mongolab.com:39960/familytree
> db.mynewcollection.find().printjson()
Tue Oct 07 08:05:08.925 TypeError: Object DBQuery: familytree.mynewcollection -> { } has no method 'printjson'
> db.mynewcollection.find().print()
Tue Oct 07 08:06:08.877 TypeError: Object DBQuery: familytree.mynewcollection -> { } has no method 'print'
> db.mynewcollection.find()

{ "_id" : ObjectId("5431d3c324f2ab29198cff49"), "foo" : "bar" }

>



 Comments   
Comment by Kay Kim (Inactive) [ 07/Oct/14 ]

Some misunderstanding regarding the cursor returned by the db.collection.find() method and the available cursor methods.

Generated at Thu Feb 08 07:47:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.