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/d1169f5124ca4bc8016e815a4da45b60 to your computer and use it in GitHub Desktop.
Save trycf/d1169f5124ca4bc8016e815a4da45b60 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
order = {"id":1234,"customer_id":333,"total":1000.00};
// Mutable way
order["a"] = "SOMETHING";
// Mutable way
order.append( {"b":"SOMETHING ELSE"} );
// Immutable way
result = duplicate(order).append({"c":"NEW STRUCT"});
writeDump([
order,
result
]);
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment