assignValueByKeyarray = (obj, keyarray, value) => {
  if (keyarray.length === 0) {
    return value;
  }
  const originObj = obj;
  const lastKeyIndex = keyarray.length - 1;
  for (const key of keyarray.slice(0, lastKeyIndex)) {
    if (!(key in obj)) {
      obj[key] = {};
    }
    obj = obj[key];
  }
  obj[keyarray[lastKeyIndex]] = value;
  return originObj;
}
@function assignValueByKeyarray - assign a value by a key array in a nested obj.
@async
@param {Object} obj - origin nested object.
@param {Array} keyarray - a group of keys indexing the updated attribute, [key_a, key_b, key_c] means the updated
               attribute is obj[key_a][key_b][key_c], will create attribute if not exist.
@param {Any} value - new value assigned to the attribute
@return {Object} Updated nested object