Calling game variable with another variable javascript

Hello there!
I'm trying to make work a plugin where at the beginning I get a variable number from a parameter like this:

var MyVariable = Number(MyVariable['My Own Variable']);

And get a game variable like this:

SecondVar = $gameVariables.value(MyVariable);

But seems that the underlined synthax is wrong, because it's not getting the correct variable value... how to fix it?
We can talk about the $gameVariables next but first let's check if you are getting the value correctly from the plugin parameters.

In what you posted above, nothing is reading the plugin parameters so it probably isn't the full code. Can you post all the code where you are reading the plugin parameter values?

Original thread: https://forums.rpgmakerweb.com/threads/calling-game-variable-with-another-variable-javascript.89636/