On Saturday, November 23, 2019 at 3:33:22 PM UTC-8, Qalisto wrote:
>
> At bottom is a snippet from a JSON file that I would save me enormous time
> IF it could be imported and mapped to produce corresponding Tiddlers.
>
> {"Name":"ADVERTISING
> FUNCTIONS","ForgottenDateTime":"2019-11-20T19:45:53.6458499","ACType":0,"Kind":1,"TagIds":[],"ThoughtIconInfo":"1::0:False:False:0","CreationDateTime":"2019-10-26T21:10:22.0864411","ModificationDateTime":"2019-10-26T21:10:22.0864411","SyncUpdateDateTime":"2019-11-20T19:45:53.6458499","SyncSentId":"028f89c1-aca5-4226-adae-5b099d24f04b","BrainId":"f5516898-0911-4776-8ecf-6bf2d2c570e0","Id":"2341913d-d9e5-451d-b924-388c906c13a0"}
> {"Name":"Sibling Level
> 1","ActivationDateTime":"2019-11-05T18:36:39.8630936","ACType":0,"Kind":1,"TagIds":[],"ThoughtIconInfo":"1::0:True:False:0","CreationDateTime":"2019-10-25T19:36:21.9749708","ModificationDateTime":"2019-10-25T19:36:22.677055","SyncSentId":"028f89c1-aca5-4226-adae-5b099d24f04b","BrainId":"f5516898-0911-4776-8ecf-6bf2d2c570e0","Id":"23cabe36-0588-402f-b823-5abb3e6930f8"}
>
> {"Name":"w13","ActivationDateTime":"2017-03-17T19:35:38.51","LinksModificationDateTime":"2017-03-17T19:35:38.966","ACType":0,"Kind":4,"TagIds":[],"ThoughtIconInfo":"8::0:False:False:0","CreationDateTime":"2019-11-20T20:54:37.7004436","ModificationDateTime":"2019-11-20T20:54:37.7004436","SyncUpdateDateTime":"0001-01-01T00:00:00","BrainId":"f5516898-0911-4776-8ecf-6bf2d2c570e0","Id":"24fbb913-79ab-58ba-aa2f-ee0594634a92"}
>
> {"Name":"w36","ActivationDateTime":"2017-12-01T14:55:29.4455678","LinksModificationDateTime":"2016-09-12T17:44:26.52","ACType":0,"Kind":4,"TagIds":[],"ThoughtIconInfo":"8::0:False:False:0","CreationDateTime":"2019-11-20T20:54:37.6256425","ModificationDateTime":"2019-11-20T20:54:37.6256425","SyncUpdateDateTime":"0001-01-01T00:00:00","BrainId":"f5516898-0911-4776-8ecf-6bf2d2c570e0","Id":"2798aa5e-933b-5a4e-abc6-76e388f81b53"}
>
Although it is very difficult to visually interpret the "slab of data" you
posted, a quick visual scan seems to indicate that your example shows 4
json objects, each of which is just a simple set of name/value pairs,
without any "nesting" of objects within those values.
To confirm this, I "pretty printed one of your example objects, just by
manually adding newlines after each comma as well as before/after the
opening and closing curly braces:
{
"Name":"ADVERTISING FUNCTIONS",
"ForgottenDateTime":"2019-11-20T19:45:53.6458499",
"ACType":0,
"Kind":1,
"TagIds":[],
"ThoughtIconInfo":"1::0:False:False:0",
"CreationDateTime":"2019-10-26T21:10:22.0864411",
"ModificationDateTime":"2019-10-26T21:10:22.0864411",
"SyncUpdateDateTime":"2019-11-20T19:45:53.6458499",
"SyncSentId":"028f89c1-aca5-4226-adae-5b099d24f04b",
"BrainId":"f5516898-0911-4776-8ecf-6bf2d2c570e0",
"Id":"2341913d-d9e5-451d-b924-388c906c13a0"
}
I then manually copied and pasted one of the object (without "pretty
printing" it first) into a tiddler, and used the value of the "Name" item
as the tiddler's "title" field, and set the value of the tiddler's "type"
field to "application/json".
Having done this, I can then easily refer to any item within the JSON
object simply by using standard TiddlyWiki syntax:
{{nameOfTiddler##itemname}}.
For example, writing
{{ADVERTISING FUNCTIONS##BrainId}}
in a tiddler results in the display of
f5516898-0911-4776-8ecf-6bf2d2c570e0
just as you would hope.
To make this even easier, if you first create separate files for each
record, each with the format:
title: nameOfTiddler
type: application/json
one record of your data pasted here
You can then just drag-and-drop those files en-masse onto any open
tiddlywiki, and the built in "$:/Import" interface will be shown with each
file listed as a tiddler to import. Pressing the "import" button will then
create all the desired tiddlers in one fell swoop.
While there are some relatively simple "data gymnastics" needed, it seems
that the overall answer to your question is a resounding "YES!". I leave
it up to you to figure out the best process for your needs.
enjoy,
-e
Eric Shulman
TiddlyTools: "Small Tools for Big Ideas!"
(tm) http://tiddlytools.github.io/ (TWClassic)
InsideTiddlyWiki: The Missing
Manuals http://insidetiddlywiki.tiddlyspot.com/ (TW5)
--
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/99476473-78f1-4a08-9e98-a20425fdf228%40googlegroups.com.