function setValue(obj, path, value) {
  var keys = path.split(".");
  var o = obj;
  while (keys.length) {
    var key = keys.shift();
    if (keys.length) {
      // this isn't the end point
      if (!o[key]) {
        o[key] = {};
      }
      o = o[key];
    } else {
      // this is the end point
      o[key] = value;
    }
  }
}
Set a value in an object, where the provided parameter name can be a
path with nested parameters. For example:

var obj = {a: 2};
setValue(obj, 'b.c', 3);     // obj = {a: 2, b: {c: 3}}
@param {object} obj
@param {string} path  A parameter name or dot-separated parameter path,
                     like "color.highlight.border".
@param {*} value