object-hierarchy-access
Version:
Get/Set value from/to JS object hierarchy properties
17 lines (15 loc) • 350 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Global</title>
</head>
<body>
<script type="module">
import {get, set} from '../../../dist/index.esm.js';
const obj = set({}, 'a', 'b', 'c', 100);
const result = get(obj, 'a', 'b', 'c');
document.body.appendChild(document.createTextNode(result));
</script>
</body>
</html>