uni-flatten
    Preparing search index...

    Function flatten

    • Flatten an object to single depth. The flattened key is represented with standard javascript object notation.

      Type Parameters

      • T

      Parameters

      • obj: Record<string, unknown>
      • Optionaloptions: UniFlattenOptions

      Returns Record<string, T>

      flatten({ a: { b: 1 } }) // { "a.b": 1 }
      flatten({ a: { b: [1] } }) // { "a.b[0]": 1 }
      flatten({ a: { '?': [1] } }) // { 'a["?"][0]': 1 }