[tw5] Re: sorting json data

2021-04-20 Thread Jean-Pierre Rivière
Thanks to the ideas of Tones, I have found out how to solve elegantly my problem. And found out two oddities as well. But firs, let 's see the the data in tiddler "projets-json": [ { "project": "pleiade", "name": "Pléiade v5", "url": "http:pleiade.test.acmeserver.com" }

[tw5] Re: sorting json data

2021-04-20 Thread Jean-Pierre Rivière
nice one too. I had not thought about using macros to define constants. Handier that using variables. Is that a regular feature of your coding, Tones? Le mardi 20 avril 2021 à 07:34:59 UTC+2, TW Tones a écrit : > In your example there is a field with the value "name" for every entry, > they d

[tw5] Re: sorting json data

2021-04-19 Thread TW Tones
In your example there is a field with the value "name" for every entry, they do not need to be sorted. If on the other hand you are referring to values in the second field like "pleiade", now that is a different story. Another approach without the JSON mangler is to parse each line, then parse

[tw5] Re: sorting json data

2021-04-19 Thread Jean-Pierre Rivière
Thank you Mark. The macro is a nice thing, but it is not a filter. This allow to build the html for a sorted table. But there might be some case where I would need to refine the filter to get a whole list of more complex data out of my filter. BUT this is not true as of now. With your help, I

[tw5] Re: sorting json data

2021-04-19 Thread 'Mark S.' via TiddlyWiki
This is a slightly different approach that I've used before. The names are all fetched in a form where they can be wikified, turned back into a list, and then sorted. Then a lookup is done by name for each item and the project is extracted. I think from this you can see how you would proceed wi