Reconstructs a nested object from a flattened one using a delimiter. Numeric keys are automatically treated as array indices so arrays are recreated correctly.
The flattened object.
The string delimiter used to split keys.
The nested (unflattened) object.
const obj = { 'a.0': 1, 'a.1': 2 };unflatten(obj);// => { a: [1, 2] } Copy
const obj = { 'a.0': 1, 'a.1': 2 };unflatten(obj);// => { a: [1, 2] }
Reconstructs a nested object from a flattened one using a delimiter. Numeric keys are automatically treated as array indices so arrays are recreated correctly.