lib/genericNodeProvider.js
function getDataFromPropPath(pathArray, obj) {
    if (pathArray.length === 0) {
        return undefined;
    }
    return pathArray.reduce((result, prop) => {
        if (typeof result !== 'object' || result === null) {
            return {};
        }
        if (prop === '') {
            return result;
        }
        return result[prop];
    }, obj);
}
function getDataFromPropPath(pathArray, obj) {
    if (pathArray.length === 0) {
        return undefined;
    }
    return pathArray.reduce((result, prop) => {
        if (typeof result !== 'object' || result === null) {
            return {};
        }
        if (prop === '') {
            return result;
        }
        return result[prop];
    }, obj);
}
function getDataFromPropPath ( pathArray , obj ) { if ( pathArray . length === 0 ) { return undefined ; } return pathArray . reduce ( ( result , prop ) => { if ( typeof result !== 'object' || result === null ) { return { } ; } if ( prop === '' ) { return result ; } return result [ prop ] ; } , obj ) ; }
Gets the value from an Object's property using a provided Object property path. An empty
property name in the path fetches all keys in the current Object.

@param {String[]} pathArray - Array of properties to traverse through.
@param {Object} obj - Object to traverse.

@returns {*} Data that was fetched from the property.
Gets the value from an Object s property using a provided Object property path . An empty property name in the path fetches all keys in the current Object .