Skip to content
This repository has been archived by the owner on Oct 24, 2018. It is now read-only.

Commit

Permalink
Merge pull request #111 from cappuc/nested-props
Browse files Browse the repository at this point in the history
Allow getting object nested properties with dot
  • Loading branch information
sebastiandedeyne authored Jan 2, 2018
2 parents 522f47a + 2587eda commit 1e7c5a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export function get(object, path) {
return object;
}

const [pathHead, pathTail] = path.split('.', 2);;
const [pathHead, pathTail] = path.split(/\.(.+)/);

return get(object[pathHead], pathTail);
}
Expand Down

0 comments on commit 1e7c5a0

Please sign in to comment.