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