set Value By Path
Sets the value of an object by a path.
setValueByPath({}, ['a', 'b'], v) -> {'a': {'b': v}}
setValueByPath({}, ['a', 'b[]', c], [v1, v2]) -> {'a': {'b': [{'c': v1}, {'c': v2}]}}
setValueByPath({'a': {'b':[{'c': v1}, {'c': v2}]}}, ['a', 'b[]', 'd'], v3) -> {'a': {'b': [{'c': v1, 'd': v3}, {'c': v2,'d': v3}]}}