Whatever message this page gives is out now! Go check it out!

StructGetMetaData

Last update:
May 18, 2026

Description

Gets metadata values for key(s) in a struct.

Returns

Struct of metadata information and the struct type.

Category

History

Added in ColdFusion (2016 release) Update 2

See also

Syntax

StructSetMetaData(Struct struct)

Parameters

Parameters
Description
struct
(Required) The input structure.

Example

<cfscript>
       example = structnew("ordered");
       example.firstname = "Yes";
       example.lastname = "Man";
       // set the metadata for the struct keys
       metadata = {firstname: {type:"string",name:"fname"},lastname:{name:"lname"}};
       StructSetMetaData(example,metadata);
       // retrieve the metadata for the keys and display
       myMetadata=StructGetMetaData(example);
       writedump(mymetadata);
</cfscript>

Output

Figure: structgetmetadata output
structgetmetadata output

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page