Parameters
Gets metadata values for key(s) in a struct.
Struct of metadata information and the struct type.
Added in ColdFusion (2016 release) Update 2
StructSetMetaData(Struct struct)
|
Parameters |
Description |
|
struct |
(Required) The input structure. |
<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>
Sign in to your account