What am I missing here? 300 objects imported, but I can’t see them with a find()
Import JSON file:
mongoimport --host localhost -db foo -collection bar --file onebigline.json
connected to: localhost
Tue Sep 11 10:36:58 imported 300 objects
MongoDB shell version: 2.2.0
Start Mongo
connecting to: test
> show dbs
foo 0.203125GB
local (empty)
> use foo
switched to db foo
show imported JSON data from db foo
> db.foo.find()
>
Your collection name from the
mongoimportcommand isbar, notfoo, so try: