Just got the answer.
I should write this instead:
db.messages.find()

On Sunday, February 26, 2017 at 8:12:20 PM UTC+2, Osher Dukarker wrote:
>
> I am trying to return a collection data in mongoDB shell.
> This is the commands I have entered in the MongoDB shell:
>
> > show dbs
> local     0.000GB
> messages  0.000GB
> restapi   0.000GB
> > use restapi
> switched to db restapi
> > show collections
> messages
> > restapi.messages.find()
> //The error:
> 2017-02-26T19:03:50.024+0200 E QUERY    [thread1] ReferenceError: restapi 
> is not defined :
>
>
> To show that I do have records in the messages collection, I am attaching 
> a  screenshot:
>
>
> <https://lh3.googleusercontent.com/-Jk1gu0ba37w/WLMXq5swJnI/AAAAAAAAOko/9jqHS2ee9gQCj-VvHwC96eWfE3sL99SagCLcB/s1600/Screenshot%2Bfrom%2B2017-02-26%2B19%253A59%253A27.png>
>
> What's wrong here?
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/ca2c1fd7-102c-4028-9f21-c67ea687699f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to