How/Can I get the
3-byte counter, starting with a random value
part from a mongodb ObjectId?
I have an ObjectId like this: ObjectId("507f1f77bcf86cd799439011")
According to mongodb documentation:
Description
ObjectId() Returns a new ObjectId value. The 12-byte ObjectId value consists of:
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 want to get the "and a 3-byte counter, starting with a random value." part from the ObjectId above if its possible.