BSON ObjectID Methods oid:data() Returns the contents of oid. oid:hash() Returns the hash value of oid. Operators tostring(oid) Returns string representation of oid. oid1 == oid2 Compares the contents of oid1 and oid2.