How can I automatically set the value of a variable

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By justintperry

I have a command line written in JSON. The command section looks like “command” : “set variable value”

I have a function that executes the command and uses a match statement for the command type such as “set”, my problem is, I’m not sure how I can make the “variable” = “value” literally. Is this possible?

:bust_in_silhouette: Reply From: klaas

Hi,
do you mean something like this?

void set ( String property, Variant value )

object.set( "myVariableName", "myValue" )