Get a value from a path in a json-like structure
function deepGet(obj, path) {
    var get_parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;

    if (!(0, _object.isObject)(obj)) throw new TypeError('Deepget is only supported for objects');

    var parts = interpolatePath(path);

    //  Return obj if no parts were passed or if only 1 part and get_parent is true
    if (parts.length === 0 || parts.length === 1 && get_parent) return obj;

    //  Cut last part if get_parent
    if (get_parent) parts.pop();

    var cursor = obj;

    while (parts.length > 0) {
        cursor = (0, _array.isArray)(cursor) ? cursor[parseInt(parts.shift())] : cursor[parts.shift()];
    }

    //  false | 0 | '' will all negate the ternary, hence we do extra checks here
    //  to make sure none of them comes back as undefined
    return cursor || cursor === !1 || cursor === 0 || cursor === '' ? cursor : undefined;
}