Alternative Ways to Read JSON Data

The OP (@Ben) for this discussion was here:

where Gemini LLM suggested:

<$transclude tiddler="test.json" index="d.e"/>

which doesn’t work because the $transclude widget can only access single-level JSON key/value pairs (i.e., no nested JSON structures at all).

After explaining the use of jsonget[], I began thinking that:

it might be a nice TWCore enhancement if the syntax suggested by Gemini actually could produce results for nested JSON objects

and @Ben followed with

Is it possible to use the jsonset Operator in a button for example to change the value?

This then lead to the ongoing discussion about how the JSON filter operators are somewhat complicated and that perhaps we could implement a simpler syntax that would allow people to use $transclude and $action-setfield with nested JSON objects without needing to use filter syntax at all.

In particular, in this post: Alternative Ways to Read JSON Data - #11 by EricShulman I compared the current filter-based syntax with some possible alternatives. Sure, they are really just “syntactic sugar”… but that’s often what makes things MUCH easier for people to understand, especially if they are not experienced coders (which is, after all, one of the goals of TiddlyWiki… to make complex tech more accessible).

-e