Hello, I threw this together. It's probably not very robust -- I would need to know more about your use case. But it should give a starting point for thinking about the problem.
BE SURE TO BACK UP YOUR TW BEFORE TRYING!!
To use, drag, drop, and import the attached JSON tiddlers into your TW.
Save and *reload*.
The "Test TestJSONData" contains this line:
<$macrocall $name="parsejson" data={{TestJSONData}} idx1="properties"
idx2="make" idx3="enum" idx4="2" />
(Returns "Honda")
Each index level into the project is called with "idx1", "idx2", etc. If
you have idx3, you must also provide idx2 and idx1.
Up to 4 index levels are possible. More levels could be added.
Eric Shulman provides a nice introduction to javascript macros here:
https://groups.google.com/forum/#!topic/tiddlywiki/M6wADVDjyTE
(last post, I think).
HTH
Mark
--
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/d41b4e6d-1391-4891-8a79-a8bb18069110%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Project_JSON1.json
Description: application/json

