Opposite of flatten-obj
. Unflattens an object with delimited keys
subject (object) - Object that needs to be unflattened
[opts] (object|string|boolean) - Optional.
{ separator: opts }
{ objectMode: opts }
{ separator: '/', objectMode: true }
Available options:
separator (string) - defaults to '.'
objectMode (boolean) - defaults to false
return (object) obj - Nested Javascript object
const unflatten = require('unflatten')
unflatten({
'a.b.c': 'd'
})
/*
{
a: {
b: {
c: 'd'
}
}
}
*/