title: How to set a Javascript object values dynamically?
body: <p>It's difficult to explain the case by words, let me give an example:</p>
  
  <pre><code>var myObj = {
      'name': 'Umut',
      'age' : 34
  };
  
  var prop = 'name';
  var value = 'Onur';
  
  myObj[name] = value; // This does not work
  
  eval('myObj.' + name) = value;   //Bad coding ;)
  </code></pre>
  
  <p>How can I set a variable property with variable value in a JavaScript object?</p>