Dave Merrill
10/10/2024, 4:22 PMs = {a:1};
x = s?.z;
writeOutput(x);
What I'm really after is a terse equivalent of this:
s = {a:1};
x = structKeyExists(s, "z") ? s.z : "some other value";
writeOutput(x);
Is there any such thing?cfsimplicity
10/10/2024, 4:34 PMx = s.z?: "some other value";
imgunvant
10/10/2024, 4:34 PMaliaspooryorik
aliaspooryorik
s = {a: false};
x = s.a ?: "Some Other Value";
writeDump( x ); // ACF returns "Some Other Value"
aliaspooryorik
aliaspooryorik
aliaspooryorik
Dave Merrill
10/10/2024, 6:16 PM