A javascript library for working with objects
Adds a key to the end of a path.
Param | Type | Default | Description |
---|---|---|---|
path | string |
The path. | |
key | string , number |
The next key to append. | |
[separator] | string |
"." |
Defines the boundary between steps in the path. |
Example
import { appendToPath } from 'object-agent';
appendToPath('first.0', 'last');
// => 'first.0.last'