[tw5] Re: JSONMangler and nested JSON

2020-07-14 Thread 'Werner' via TiddlyWiki
OK, it took me quite a bit to get my head wrapped around, but I've come up with a solution that works for me. In order to dive into the nested array and access the indexes in there, I had to resort to a macro renderIndex(), but, as a positive side effect, this makes the code more readable. So

[tw5] Re: JSONMangler and nested JSON

2020-07-12 Thread Joshua Fontany
I think you are almost there. One thing to keep in mind in Tiddlkywiki is the difference between "shorthand" Wikitext and "long form" Widgets. {{Title##Index}} is "shorthand" Wikitest that is then rendered into the following by the TW core: ``` <$tiddler tiddler="Title"> <$transclude

[tw5] Re: JSONMangler and nested JSON

2020-07-12 Thread 'Werner' via TiddlyWiki
Hi Joshua, thanks so much for your answer. This has taken me a lot further. But, reconsidering my original question, I found, that, maybe, I got stuck too much in the procedural paradigm, and a more elegant approach would be, if one could could use each[] for looping through a JSON array.

[tw5] Re: JSONMangler and nested JSON

2020-07-11 Thread Joshua Fontany
Hi, Great to see people experimenting with my tools. Two things to note. 1) 0-index based arrays can always have a new object written to an index equal to the length of the array. Example, "[0,1,2]", I can push "3" to {{MyJson##3}}, and it will be "[0,1,2,3]". Neat trick. 2) You can count an

[tw5] Re: JSONMangler and nested JSON

2020-07-10 Thread 'Werner' via TiddlyWiki
Hi Tony, thanks for taking your time and your extensive reply. Perhaps I've made it too complicated. Ok, I try to reformulate it. Disclaimer also: I work in a corporate environment, so I'm not completely free in the tools I am allowed to use (to my surprise, Node.js is ok - ye!) and how

[tw5] Re: JSONMangler and nested JSON

2020-07-09 Thread TW Tones
Werner, Despite clearly having a lot in common with an understanding of databases I don't completely follow you need or argument here. However I believe I can offer you some helpful leads. One part that confuses me is your 1:n or one to many, I have already build one to one, one to many and