Function unflatten

  • Reverts a flattened object back to its nested structure, with support for arrays.

    Parameters

    • object: Record<string, any>

      The object to unflatten

    • delimiter: string = '.'

      The delimiter used to flatten the object

    Returns object

    A nested object or array