src/object/index.js
function (paths, obj, defaultValue = null) {
        if (!Array.isArray(paths)) {
            throw new Error("paths must be an array of strings");
        }

        let res = defaultValue;
        paths.some(path => {
            const result = this.getFlattened(path, obj, defaultValue);
            if (result !== defaultValue) {
                res = result;
                return true;
            }
            return false;
        });

        return res;
    }
function (paths, obj, defaultValue = null) {
        if (!Array.isArray(paths)) {
            throw new Error("paths must be an array of strings");
        }

        let res = defaultValue;
        paths.some(path => {
            const result = this.getFlattened(path, obj, defaultValue);
            if (result !== defaultValue) {
                res = result;
                return true;
            }
            return false;
        });

        return res;
    }
function ( paths , obj , defaultValue = null ) { if ( ! Array . isArray ( paths ) ) { throw new Error ( "paths must be an array of strings" ) ; } let res = defaultValue ; paths . some ( path => { const result = this . getFlattened ( path , obj , defaultValue ) ; if ( result !== defaultValue ) { res = result ; return true ; } return false ; } ) ; return res ; }
Receives a list of paths and use getFlattened to get the first existent value
@param {String[]} paths
@param {Object} obj
@param {any} defaultValue
@return {any}
@see getFlattened
@memberof object
Receives a list of paths and use getFlattened to get the first existent value