StructGet
Retrieves the value from a struct using a path based expression
Method Signature
Arguments
Argument
Type
Required
Description
Default
path
string
true
The string path to the object requested in the struct
Examples
Get a value in a structure using structGet
Result: 8
Accidentally Modifying a Structure
The structGet function will modify the variable x by adding a new structure x.a and also adds a key x.a.b to satisfy the path.
Accidentally Overwriting a variable using structGet
The value of x.y.z[2] will be set to an empty struct.
Additional Examples
Related
Last updated
Was this helpful?