dotpather-transform
tranform nested objects with dotpaths
install
npm i dotpather-transform
usage
var dotpather = var transform = var data = one: two: three: 4 var transformed = // { one: { two: { three: 5 } } }
You can also refer to array indexes
var transform = var data = one: two: three: 4 five: 6 7 let obj = // { one: { two: { three: [4, { five: [ 6, 8 ] } ] } } }