Resolved my problem.
to delete a fied or an index, you can (and in json that's an index, so it's
"you must") use $action/setfield without specifying any $value.
thus to get rid of "foo" in my previous example all I have to do is:
<$action-setfield $tiddler="data" $index="foo"/>
this possibility should be recalled in the doc of $action-deletefield.
and why is there not any $acion-deleteindex?
Le lundi 3 mai 2021 à 22:45:29 UTC+2, Jean-Pierre Rivière a écrit :
> I have tiddler "data" of json data like
>
> {
> "foo": { ... },
> "bar": { ... }
> }
>
> I want to get rid of "foo".
>
> so I have setup a $button where the action is
>
> <$action-deletefield $tiddler="data" $field="foo"/>
>
> the action does nothing (if I set an action-deletefield instead, it works
> so the problem is just the deletefield widget).
>
> any idea?
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/9b08558c-6dff-4e7c-a6fc-25d0fa018a2an%40googlegroups.com.