Jeremy,

I did it! But not quite in the way you described and I don't entirely 
understand what it is I have done. My current "handleresult" function from 
above is the only thing that has changed: 

```javascript

function handleresult(err, data) {
  if(err)throw err;
  console.log(data.Body.toString('utf-8'));
  var tiddlersjson = JSON.parse(data.Body.toString('utf-8'));
  console.log(tiddlersjson[0]);
  //$tw.wiki.addTiddlers([new $tw.Tiddler($tw.wiki.getModificationFields(), 
{"title": "Tiddler1","text": "Hello"})])
  $tw.wiki.addTiddlers([new $tw.Tiddler($tw.wiki.getModificationFields(), 
tiddlersjson[0])]);
  return data;
}

``` 

I was going through the page you linked to when I saw the $tw.wiki.addTiddlers 
function which was perfect. I was able to find a few other examples of people 
using it so I twisted until I got it right with the format being passed back. I 
couldn't find any documentation on it though so I am wondering what the first 
argument does. Is there documentation on this function and others like it I 
could go through?


On a related note, what does the $tw.wiki.getModificationFields() function do? 
Is that just an arguement stating what is about to come is jsonified fields? 


I am going to do some code cleanup and try to account for any number of 
tiddlers being in the object I get back, but if you have any other suggestions 
for improvement they would be very welcome!


Thank you again for all your help here,


Justin

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/a268a218-e04b-429a-9bdd-c28ef2be1f4a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to