IteratePlan.prototype.result( outputType as String, [bindings as String], [traceFlags as String] ) as Plan
This method executes the plan (mapping or reducing, if specified) to generate the result, which is a plan, document plan, prepared plan, or map or reduce result plan.
Unless otherwise mapped or reduced, each row is returned as a sem.binding object with a property for each column that exists in the row.
result
is a method of the following classes:
const op = require('/MarkLogic/optic'); op.fromView('main', 'employees')orderdef .select(['EmployeeID', 'FirstName', 'LastName']) .orderBy('EmployeeID') .result();
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.