convert objectId to string code example Example: convert objectId to string ObjectId("507c7f79bcf86cd7994f6c0e").toString()