Simple Path
James DiGioia
const getPath = (path, target) =>path.split('.').reduce((value, key) => value[key], target);// Usageconst path = 'a.b.c';const target = {a: {b: {c: true}}};assert(true === getPath(path, target));
get.js
James DiGioia
const getPath = (path, target) =>path.split('.').reduce((value, key) => value[key], target);// Usageconst path = 'a.b.c';const target = {a: {b: {c: true}}};assert(true === getPath(path, target));