var input = {
"id": 'AB',
"specified.name": 'some name',
"specified.manufacturer": 'some manufacturer',
"specified.environment.state": 'good'
}
/**
var expectedOutput = {
id:'AB',
specified: {
name: 'some name',
manufacturer: 'some manufacturer',
environment: {
state: 'good'
}
}
};
**/
https://jsbin.com/senehijula/edit?html,js,output
I'm aware there are some similar questions but not really like this one.
Any elegant way of doing this?