setProperty just returns a copy of the JSON with that particular key value pair modified. To actually modify a variable, you need to do a set action and set it to the desired json output (which can be, for example, the compose output).