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