ArrayGetMetadata
Gets metadata for items of an array and indicates the array type.
Method Signature
ArrayGetMetadata(array=[array])
Arguments
Argument
Type
Required
Description
Default
array
array
true
The array to be inserted into
Examples
Simple Example
// Create an array
arrayList = [
"apple",
"pineapple",
"mango"
];
// Fetch meta data
data = arrayGetMetadata( arrayList );
// Print array type
writeOutput( data.TYPE );
Result: synchronized
Member Function Example
// Create an array
arrayList = [
"apple",
"pineapple",
"mango"
];
// Fetch meta data
data = arrayList.getMetadata();
// Print array type
writeOutput( data.TYPE );
Result: synchronized
Dump Metadata of Typed Array (Member syntax)
Return struct has a new key called dimensions
and can also have a defined datatype. Supported datatypes are String, Numeric, Boolean, Date, Array, Struct, Query, Component, [Component name], Binary, and Function.
arr = arrayNew[ "String" ]( 1 );
writeOutput( JSONSerialize( arr.getMetadata() ) );
Result: {"dimensions":1,"datatype":"String","type":"synchronized"}
Related
Last updated
Was this helpful?