arrayGetMetadata

Gets metadata for items of an array and indicates the array type.

arrayGetMetadata(array) → returns struct

Member Function Syntax

someArray.getMetadata()

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

Argument Reference

array array
Required

The array for which to get the metadata.

Examples
Sample code invoking the arrayGetMetadata function

// Create an array
arrayList = ["apple", "pineapple", "mango"];

// Fetch meta data
data = arrayGetMetadata(arrayList);

// Print array type
writeOutput(data.type);

Expected Result: synchronized

// Create an array
arrayList = ["apple", "pineapple", "mango"];

// Fetch meta data
data = arrayList.getMetadata();

// Print array type
writeOutput(data.type);

Expected Result: synchronized


Fork me on GitHub