update fn.test example code to see the difference between params and srcVariable.params
This commit is contained in:
parent
a895787851
commit
e4b832d37d
|
@ -1,5 +1,5 @@
|
||||||
created: 20240506132850677
|
created: 20240506132850677
|
||||||
modified: 20240506150652759
|
modified: 20240506151551620
|
||||||
tags: [[Operator Examples]] [[jsonvariable Operator]]
|
tags: [[Operator Examples]] [[jsonvariable Operator]]
|
||||||
title: jsonvariable Operator (Examples)
|
title: jsonvariable Operator (Examples)
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
@ -7,7 +7,7 @@ type: text/vnd.tiddlywiki
|
||||||
The following example shows the "internal" structure of the `fn.test` function defined in <<.olink jsonvariable>> operator
|
The following example shows the "internal" structure of the `fn.test` function defined in <<.olink jsonvariable>> operator
|
||||||
|
|
||||||
<<.example 1 """\procedure testProc() [[aa aa]] bb
|
<<.example 1 """\procedure testProc() [[aa aa]] bb
|
||||||
\function fn.test(splitChar:" ") [enlist<testProc>format:titlelist[]]
|
\function fn.test(splitChar:" " not-used) [enlist<testProc>format:titlelist[]]
|
||||||
|
|
||||||
<pre><code><$text text={{{[[fn.test]jsonvariable[]]}}}/></code></pre>
|
<pre><code><$text text={{{[[fn.test]jsonvariable[]]}}}/></code></pre>
|
||||||
""">>
|
""">>
|
||||||
|
@ -15,7 +15,7 @@ The following example shows the "internal" structure of the `fn.test` function d
|
||||||
The following example shows the same structure ''pretty printed'' using the <<.olink format>> filter operator
|
The following example shows the same structure ''pretty printed'' using the <<.olink format>> filter operator
|
||||||
|
|
||||||
<<.example 2 """\procedure testProc() [[aa aa]] bb
|
<<.example 2 """\procedure testProc() [[aa aa]] bb
|
||||||
\function fn.test(splitChar:" ") [enlist<testProc>format:titlelist[]]
|
\function fn.test(splitChar:" " not-used) [enlist<testProc>format:titlelist[]]
|
||||||
|
|
||||||
\function tab() [charcode[9]]
|
\function tab() [charcode[9]]
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ The following example shows the same structure ''pretty printed'' using the <<.o
|
||||||
The following example extracts the ''function definition'' using the <<.olink jsonextract>> filter operator
|
The following example extracts the ''function definition'' using the <<.olink jsonextract>> filter operator
|
||||||
|
|
||||||
<<.example 3 """\procedure testProc() [[aa aa]] bb
|
<<.example 3 """\procedure testProc() [[aa aa]] bb
|
||||||
\function fn.test(splitChar:" ") [enlist<testProc>format:titlelist[]]
|
\function fn.test(splitChar:" " not-used) [enlist<testProc>format:titlelist[]]
|
||||||
|
|
||||||
<pre><code><$text text={{{[[fn.test]jsonvariable[]jsonextract[srcVariable],[value]]}}}/></code></pre>
|
<pre><code><$text text={{{[[fn.test]jsonvariable[]jsonextract[srcVariable],[value]]}}}/></code></pre>
|
||||||
""">>
|
""">>
|
||||||
|
@ -33,10 +33,9 @@ The following example extracts the ''function definition'' using the <<.olink js
|
||||||
The following example extracts the `srcVariables.params` without pretty printing using <<.olink jsonextract>>
|
The following example extracts the `srcVariables.params` without pretty printing using <<.olink jsonextract>>
|
||||||
|
|
||||||
<<.example 4 """\procedure testProc() [[aa aa]] bb
|
<<.example 4 """\procedure testProc() [[aa aa]] bb
|
||||||
\function fn.test(splitChar:" ") [enlist<testProc>format:titlelist[]]
|
\function fn.test(splitChar:" " not-used) [enlist<testProc>format:titlelist[]]
|
||||||
|
|
||||||
\function tab() [charcode[9]]
|
\function tab() [charcode[9]]
|
||||||
|
|
||||||
<pre><code><$text text={{{[[fn.test]jsonvariable[]jsonextract[srcVariable],[params]format:json<tab>]}}}/></code></pre>""">>
|
<pre><code><$text text={{{[[fn.test]jsonvariable[]jsonextract[srcVariable],[params]format:json<tab>]}}}/></code></pre>""">>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
caption: jsonvariable
|
caption: jsonvariable
|
||||||
created: 20240506131935424
|
created: 20240506131935424
|
||||||
modified: 20240506145944709
|
modified: 20240506151517068
|
||||||
op-input: a selection variable names
|
op-input: a selection variable names
|
||||||
op-output: the JSON string values of each of the retrieved properties
|
op-output: the JSON string values of each of the retrieved properties
|
||||||
op-parameter: one or more indexes of the property to retrieve
|
op-parameter: one or more indexes of the property to retrieve
|
||||||
|
@ -11,7 +11,7 @@ title: jsonvariable Operator
|
||||||
type: text/vnd.tiddlywiki
|
type: text/vnd.tiddlywiki
|
||||||
|
|
||||||
\procedure testProc() [[aa aa]] bb
|
\procedure testProc() [[aa aa]] bb
|
||||||
\function fn.test(splitChar:" ") [enlist<testProc>format:titlelist[]]
|
\function fn.test(splitChar:" " not-used) [enlist<testProc>format:titlelist[]]
|
||||||
\function tab() [charcode[9]]
|
\function tab() [charcode[9]]
|
||||||
|
|
||||||
<<.from-version "5.3.4">>
|
<<.from-version "5.3.4">>
|
||||||
|
@ -22,7 +22,7 @@ Properties within a JSON object are identified by a sequence of indexes. In the
|
||||||
|
|
||||||
```
|
```
|
||||||
\procedure testProc() [[aa aa]] bb
|
\procedure testProc() [[aa aa]] bb
|
||||||
\function fn.test(splitChar:" ") [enlist<testProc>format:titlelist[]]
|
\function fn.test(splitChar:" " not-used) [enlist<testProc>format:titlelist[]]
|
||||||
|
|
||||||
\function tab() [charcode[9]]
|
\function tab() [charcode[9]]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue