<
<
1 2 3-{ + "input": [ + "$:/core", + "ExpectedResult", + "Output" + ], + "runs": [ + { + "input": [], + "prefixName": "or", + "operators": [ + { + "operatorName": "title", + "operands": [ + "1" + ], + "input": [ + "$:/core", + "ExpectedResult", + "Output" + ] + } + ] + }, + { + "input": [ + "1" + ], + "prefixName": "or", + "operators": [ + { + "operatorName": "title", + "operands": [ + "2" + ], + "input": [ + "$:/core", + "ExpectedResult", + "Output" + ] + } + ] + }, + { + "input": [ + "1", + "2" + ], + "prefixName": "or", + "operators": [ + { + "operatorName": "title", + "operands": [ + "3" + ], + "input": [ + "$:/core", + "ExpectedResult", + "Output" + ] + } + ] + } + ], + "output": [ + "1", + "2", + "3" + ] +}
\ No newline at end of file diff --git a/editions/tw5.com/tiddlers/filters/inspect Operator.tid b/editions/tw5.com/tiddlers/filters/inspect Operator.tid new file mode 100644 index 000000000..44460ca1c --- /dev/null +++ b/editions/tw5.com/tiddlers/filters/inspect Operator.tid @@ -0,0 +1,26 @@ +caption: inspect +created: 20250401094200994 +modified: 20250401094200994 +op-input: a [[selection of titles|Title Selection]] +op-output: a JSON object containing the input, output and intermediate results of evaluating the specified filter +op-parameter: the filter to be inspected +op-parameter-name: F +op-purpose: inspect the evaluation of a filter to aid debugging +tags: [[Filter Operators]] +title: inspect Operator +type: text/vnd.tiddlywiki + +<<.from-version "5.3.7">> The <<.op inspect>> operator evaluates a filter with the specified input titles and returns a JSON object containing the input, output and intermediate results of evaluating the specified filter. + +The JSON object contains the following properties: + +* `input`: the input titles passed to the filter +* `output`: the output titles resulting from evaluating the filter +* `runs`: an array of objects, each of which represents a single run of the filter. Each object contains the following properties: +** `prefixName`: the name of the prefix operator that was used in this run +** `input`: the input titles passed to the prefix operator +** `operators`: an array of objects, each of which represents a single operator that was used in this run. Each object contains the following properties: +*** `operatorName`: the name of the operator +*** `operands`: an array of string operands passed to the operator +*** `input`: the input titles passed to the operator +