var property = object['nameofproperty'];
I guess it's just a matter of forwarding it to the NamedValueSet of the DynamicObject.
While we are at, why can't we directly access the properties of an DynamicObject using that same notation.
DynamicObject* obj = new DynamicObject(); //so instead of this obj->setProperty("enabled", true); var isEnabled = obj->getProperty("enabled"); //Could this be done? obj["enabled"] = true; var isEnabled = obj["enabled"];
I mean a DynamicObject is in fact a wrapper around the NamedValueSet which does support the reading of a NamedValue using the bracket notation, i see setting of NamedValue is not allowed through it, and i can imagine this is done with a reason. Although i can't see a strong reason why this isn't allowed.