Simple Path

const getPath = (path, target) =>
    path.split('.')
        .reduce((value, key) => value[key], target);

// Usage
const path = 'a.b.c';
const target = {
    a: {
        b: {
            c: true
        }
    }
};

assert(true === getPath(path, target));