StructDelete

Deletes a key from a struct

Method Signature

StructDelete(struct=[modifiableStruct], key=[any])

Arguments

Argument
Type
Required
Description
Default

struct

modifiableStruct

true

The struct target

key

any

true

The key to delete

Examples

Remove a key from a struct

Creates a struct then removes a key

Run Example

someStruct = { 
	A : 1,
	B : 2
};
structDelete( someStruct, "a" );
writeDump( someStruct );

Result: Struct with one key-value pair: B 2

Remove a key from a struct using the member function

Invoking the delete function on a struct is the same as running structDelete.

Run Example

Result: Struct with one key-value pair: B 2

Additional Examples

Run Example

Last updated

Was this helpful?