Hi Werner,

Great questions!


   - couldn't "compareindex[]" be achieved with getindex[]compare[]? Or 
   have I got something wrong? 
      - You could use that syntax, but unfortunately the text returned 
      would be the value of the getindex[/index] operator, NOT the tiddler 
title.
      - The new syntax allows "[[Test]compareindex:/value:number:eq[3]]" to 
      return [[Test]] instead of "3".
   - is something like  [[Test]compareindex:<myIndex>:number:eq[3]]  legit? 
   e.g. when I want to dynamically create the field name?
      - No, unfortunately, as it is part of the operator suffixes, you 
      cannot use the normal variable/translcude braces.
      - In order to dynamically pass a field or index, set it as a variable 
      (here transcluded from a tiddler's text field), then call the macro to 
      build the final filter:
      
      \define dynamicCompareFieldFilter()
      [<currentTiddler>comparefield:$(field)$:number:eq[3]]
      \end 
      
      <$tiddler tiddler="Test">
      <$set name="field" value={{FieldSourceTiddler}}>
      <$list variable="show" filter=<<dynamicCompareFieldFilter>> />
      </$set>
      </$tiddler>
   
Best,
Joshua F

On Monday, September 28, 2020 at 9:27:16 AM UTC-7 Werner wrote:

> Joshua, thanks for providing and caring for JsonMangler. Two stupid noob 
> questions.
>
> - couldn't "compareindex[]" be achieved with getindex[]compare[]? Or have 
> I got something wrong?
> - is something like  [[Test]compareindex:<myIndex>:number:eq[3]]  legit? 
> e.g. when I want to dynamically create the field name?
>
> Thanks, Werner
>
> joshua....@gmail.com schrieb am Sonntag, 27. September 2020 um 01:32:15 
> UTC+2:
>
>> This release ads two new filter operators: "comparefield[]" and 
>> "compareindex[]" operators that function as "compare[]" on a specific field 
>> or index. The first prefix is now the field or index name. See the help 
>> documentation in the example wiki.
>>
>> Requires TiddlyWiki v5.1.23-pre
>>
>> I now have a new domain that hosts all my wiki experiments. The demo wiki 
>> for this plugin is now located at: 
>> https://chronicles.wiki/TW5-JsonMangler/
>>
>> Download the node-folders at: 
>> https://github.com/joshuafontany/TW5-JsonMangler/releases/tag/v2.2.3
>>
>> Best,
>> Joshua Fontany
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c54e61e6-f4b6-4d75-9c11-c0e4bc57ff5en%40googlegroups.com.

Reply via email to