OPTIONS

UUID()

On this page

Definition

UUID(<string>)

Generates a BSON UUID object.

Parameter Type Description
hex string Specify a 32-byte hexadecimal string to convert to the UUID BSON subtype.
Returns:A BSON UUID object.

Example

Create a 32 byte hexadecimal string:

var myuuid = '0123456789abcdeffedcba9876543210'

Convert it to the BSON UUID subtype:

UUID(myuuid)
BinData(3,"ASNFZ4mrze/+3LqYdlQyEA==")

Was this page helpful?

Yes No

Thank you for your feedback!

We're sorry! You can Report a Problem to help us improve this page.