This is a reverse question to this question.
Given an object x={a:1,b:2} and a string c.d=3, modify object x to the following:
x={a:1,b:2}
c.d=3
You can do this with lodash.set()
> l=require('lodash') > x={a:1,b:2}; { a: 1, b: 2 } > l.set(x, 'c.d', 3) { a: 1, b: 2, c: { d: 3 } }