title: How to programmatically set object properties in JavaScript?
body: <p>How can I use a dictionary of text names and values to set properties on an object?  For example...</p>
  
  <p>I need to populate this object:</p>
  
  <pre><code>item = {};
  </code></pre>
  
  <p>Using this collection of values (note everything is a string):</p>
  
  <pre><code>values = [
      { id: 1, name: "a", value: "true" },
      { id: 2, name: "b", value: "false" },
      { id: 3, name: "c", value: "100" },
      { id: 4, name: "d", value: "me@nowhere.com" }
  ];
  </code></pre>
  
  <p>So that the original object looks like this:</p>
  
  <pre><code>item = {
      a: true,
      b: false,
      c: 100,
      d: 'me@nowhere.com'
  }
  </code></pre>
  
  <p>Sorry for being so vague, but I'm not sure where to even start.</p>