struct.append()

Appends all the data from struct2 into struct1, replacing duplicate keys unless specified by the overwrite flag

struct.append( Struct2=struct, OverwriteFlag=boolean )

Returns: Struct

Argument Description
Struct2
struct, required

Structure that contains the data to append to struct1

OverwriteFlag
boolean, optional
  • true (default): values in struct2 overwrite corresponding values in struct1.

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
	animals.append(newAnimal);
	// Show animals, now includes cat
	Dump(
		label: "Animals with cat added",
		var: animals
	);

See also