function lookup(input, key) {
        // lookup the 'name' item in the input
        var result;
        if (Array.isArray(input)) {
            result = createSequence();
            for(var ii = 0; ii < input.length; ii++) {
                var res =  lookup(input[ii], key);
                if (typeof res !== 'undefined') {
                    if (Array.isArray(res)) {
                        res.forEach(val => result.push(val));
                    } else {
                        result.push(res);
                    }
                }
            }
        } else if (input !== null && typeof input === 'object' && !isFunction(input)) {
            result = input[key];
        }
        return result;
    }
Return value from an object for a given key
@param {Object} input - Object/Array
@param {String} key - Key in object
@returns {*} Value of key in object