code: function parseComplexParam(queryParams: Object, keys: Object, value: any): void {
    let currentParams = queryParams;
    let keysLastIndex = keys.length - 1;
    for (let j = 0; j <= keysLastIndex; j++) {
      let key = keys[j] === '' ? currentParams.length : keys[j];
      if (j < keysLastIndex) {
        // The value has to be an array or a false value
        // It can happen that the value is no array if the key was repeated with traditional style like `list=1&list[]=2`
        let prevValue = !currentParams[key] || typeof currentParams[key] === 'object' ? currentParams[key] : [currentParams[key]];
        currentParams = currentParams[key] = prevValue || (isNaN(keys[j + 1]) ? {} : []);
      } else {
        currentParams = currentParams[key] = value;
      }
    }
  }
docs: Sequentially process parameter that was recognized as complex value (object or array).
  For each keys part, if the current level is undefined create an
  object or array based on the type of the next keys part.
  
  @param queryParams root-level result object.
  @param keys Collection of keys related to this parameter.
  @param value Parameter value to append.