For the complete documentation index, see llms.txt. This page is also available as Markdown.

StructKeyTranslate

Converts a struct with dot-notated keys in to an unflattened version

Method Signature

StructKeyTranslate(struct=[structloose], deep=[boolean], retainKeys=[boolean])

Arguments

Argument
Type
Required
Description
Default

struct

struct

true

The struct to unflatten

deep

boolean

false

Whether to recurse in to nested keys - default false

false

retainKeys

boolean

false

Whether to retain the original dot-notated keys - default false

false

Examples

Translate struct keys using a mapping

data = { first_name: "Luis", last_name: "Majano" };
mapping = { first_name: "firstName", last_name: "lastName" };
result = structKeyTranslate( data, mapping );
writeOutput( result.containsKey( "firstName" ) );

Result: true

Using the member function

Result: admin

Last updated

Was this helpful?