function evaluateDescendants(expr, input) {
        var result;
        var resultSequence = createSequence();
        if (typeof input !== 'undefined') {
            // traverse all descendants of this object/array
            recurseDescendants(input, resultSequence);
            if (resultSequence.length === 1) {
                result = resultSequence[0];
            } else {
                result = resultSequence;
            }
        }
        return result;
    }
Evaluate descendants against input data
@param {Object} expr - JSONata expression
@param {Object} input - Input data to evaluate against
@returns {*} Evaluated input data