javascript - updating global object variables via a function
<p>Weird problem here, I'm trying to use a global function to update my settings object, example:</p>

<pre><code>    var Settings = new Object;
    Settings.savepos = 'true';

    function UpdateSetting(obj,value){
        eval("Settings.obj = value");
        alert(Settings.savepos);
    }
</code></pre>

<p>The obj is the key of the object, meaning if I call the function with </p>

<pre><code>UpdateSetting('savepos','false')
</code></pre>

<p>the alert will always just give me true, how do I convert that eval or any alternative so it will update settings object's key with the value?</p>
