Possible Duplicate:
mongoexport without _id field
How do I remove the _Id field when using mongoexport?
$ ./mongo
MongoDB shell version: 2.2.2
connecting to: test
> db.coll.insert( {first: "John", last: "Doe"} )
> exit
$./mongoexport --db test --collection coll --out out.json --fields 'first,last'
out.json:
{ "_id" : { "$oid" : "50bc20b3cef5182e2a788fc9" }, "first" : "John", "last" : "Doe" }
instead of:
{ "first" : "John", "last" : "Doe" }