Flatten rewrites nested objects and arrays as one object mapping paths to leaf values, such as user.address.city becoming one key. Unflatten reads those paths and rebuilds containers, which is useful when moving data through spreadsheets, environment variables, or key-value stores that do not support nesting.
The delimiter is part of the format. If an original key already contains the same dot or custom delimiter, the flattened result is ambiguous. Array indexes also need to remain numeric path segments so unflatten can rebuild arrays instead of ordinary objects.