What's the best way to set local JS variables from JSON
<p>I'd like to do something like the following w/o using eval(). What's the best way to do that?</p>

<pre><code>config: function(config) {
  for (var key in config) {
    if (config.hasOwnProperty(key)) {
      console.log('setting: ' + key + ' = ' + config[key]);
      eval(key + ' = "' + config[key] + '"');
    }
  }
}
</code></pre>
