Database

[{"_id":ObjectId("5ee8b4b32af76531cd46d714")},{"_id":ObjectId("5ee8b4b32af76531cd46d715")}]

Query

db.collection.find({},{_id:{$arrayToObject:[[{k:{"$literal":"$oid"},v:"$_id"}]]}})

Result