Exctract object ID from BSON object

19 views
Skip to first unread message

revit

unread,
Nov 16, 2016, 12:05:21 PM11/16/16
to mongodb-dev
I would like to extract the Object ID from a BSON object. To be more specific given a bson object I would like to extract the objectID components
as described in https://docs.mongodb.com/v3.2/reference/method/ObjectId/:
  • a 4-byte value representing the seconds since the Unix epoch,
  • a 3-byte machine identifier,
  • a 2-byte process id, and
  • a 3-byte counter, starting with a random value.
I appropriate help with that,
Thanks

Reply all
Reply to author
Forward
0 new messages