Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/571c5b2fd9e355fda870a6da04a1ff45 to your computer and use it in GitHub Desktop.
Save trycf/571c5b2fd9e355fda870a6da04a1ff45 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
myMainStructure = {};
myMainStructure.A.SubKey.SubSubKey = "Hello world 1";
myMainStructure.B.SubKey.SubSubKey = "Hello world 2";
myMainStructure.C.SubKey.SubSubKey = "Hello world 3";
myMainStructure.D.SubKey.SubSubKey = "Hello world 4";
dump(myMainStructure);
structDelete(myMainStructure.A, 'SubKey');
var key_path = 'B.SubKey.SubSubKey';
structDelete( structGet( 'myMainStructure.#key_path.listDeleteAt( key_path.listLen('.') , '.' )#' ) , key_path.listLast('.') );
dump(myMainStructure);
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment