In older Boxlang version where this function is not supported yet, you can fall back to a native java method to achieve the same behavior except that it does not have the overwriteFlag.
config = {
A : 0,
B : 0
};
options = {
B : 1,
C : 1
};
config.putAll( options );
writeOutput( JSONSerialize( config ) );
Result: {"A":0,"B":0,"C":1}
Additional Examples
animals = {
COW : "moo",
PIG : "oink"
};
// Show current animals
Dump( label="Current animals", var=animals );
// Create a new animal
newAnimal = {
CAT : "meow"
};
// Append the newAnimal to animals
StructAppend( animals, newAnimal );
// Show animals, now includes cat
Dump( label="Animals with cat added", var=animals );