code: function flatten(data, pre) {
    const prefix = pre || '';
    const keys = Object.keys(data);
    const result = {};
    keys.forEach((k) => {
      const value = data[k];
      const key = [prefix, k].join('-');
      if (isObject(value)) {
        Object.assign(result, flatten(value, key));
      } else {
        result[key] = value;
      }
    });
    return result;
  }
docs: Flatten the data
  
  @param {Object} data
  @returns