get id of returned mongo db doc code example
Example 1: what is objectid in mongodb
{
"_id": ObjectId("54759eb3c090d83494e2d804")
}
Example 2: mongo query new id
x = ObjectId()
{
"_id": ObjectId("54759eb3c090d83494e2d804")
}
x = ObjectId()