mongoBsonJSNew

Creates a BSON JavaScript value, which stores JavaScript code in a document field.

mongoBsonJSNew(code [, scope]) → returns any

This function requires Adobe ColdFusion 2021 and up.  Not supported on Lucee, etc.

Argument Reference

code string
Required

The JavaScript code to store.

scope struct

Struct of variables available to the code.

Compatibility

ColdFusion:

Version 2021+ Requires the mongodb package

Examples
Sample code invoking the mongoBsonJSNew function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub