Determines whether a value is an object.
True, if the value represents a CFML object. False if
the value is any other type of data, such as an integer, string,
date, or struct.

isObject(value) → returns boolean

isObject Argument Reference

value any

Examples sample code invoking the isObject function

isObject Example

Returns true if the parameter is a CFML object. The CFML object here is a Java object.

random = createObject( "java", "" ).getInstance( "SHA1PRNG" );
writeOutput( isObject( random ) );

Expected Result: true

isObject Example for Other Data Types

Returns false if the parameter is any data type other than a CFML object

example = { 'name' = 'I am a struct' };
writeOutput( isObject( example ) );

Expected Result: false

Fork me on GitHub