// 将传入的Objct解构成一层
export const ObjectFlat = (obj: any) => {
  const res: any = {}
  const isObj = (obj: any) => {
    for (const key in obj) {
      if (Object.prototype.toString.call(obj[key]) == '[object Object]') {
        isObj(obj[key])
      } else {
        res[String(key)] = obj[key]
      }
    }
  }
  isObj(obj)
  return res
}
