Yes, but you need to use a different notation -
instead of runtime.globalVars.gameState = 10
use runtime.globalVars["gameState"] = 10
If you extracted your variable name from JSON into another variable VarName, then your script should look like this:
runtime.globalVars[runtime.globalVars.VarName] = 10