Returns a value in a structure or a structure in the specified path.
structGet(path)
→ returns any
x = { y = { z=8 } };
writeDump( structGet("x.y.z") );
Expected Result: 8
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.
x = { y = { z=8 } };
writeDump( structGet("x.a.b") );
writeDump(x);
The value of x.y.z[2] will be set to an empty struct.
x = { y = { z=[1,2,3] } };
writeDump( structGet("x.y.z[2]") );
writeDump(x);
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.