{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-start-of-layout","objectClass":"System"}],"actions":[{"id":"request-project-file","objectClass":"AJAX","parameters":{"tag":"\"\"","file":"books.json"}},{"id":"wait-for-previous-actions","objectClass":"System"},{"id":"load","objectClass":"Array","parameters":{"json":"AJAX.LastData"}},{"id":"signal","objectClass":"System","parameters":{"tag":"\"json\""}}]},{"eventType":"block","conditions":[{"id":"on-signal","objectClass":"System","parameters":{"tag":"\"json\""}}],"actions":[{"id":"set-array","objectClass":"JSON","parameters":{"path":"\"books\"","size":"0"}}],"children":[{"eventType":"block","conditions":[{"id":"for","objectClass":"System","parameters":{"name":"\"book\"","start-index":"0","end-index":"Array.Height-1"}}],"actions":[{"type":"comment","text":"add a book"},{"id":"push-value","objectClass":"JSON","parameters":{"where":"back","path":"\"books\"","value":"0"}},{"id":"set-object","objectClass":"JSON","parameters":{"path":"\"books.\" & loopindex"}},{"id":"set-path","objectClass":"JSON","parameters":{"path":"\"books.\" & loopindex"}}],"children":[{"eventType":"block","conditions":[{"id":"for","objectClass":"System","parameters":{"name":"\"info\"","start-index":"0","end-index":"Array.Width-1"}}],"actions":[{"type":"comment","text":"info"},{"id":"set-value","objectClass":"JSON","parameters":{"path":"\".title\"","value":"Array.At(0, loopindex(\"book\"))"}},{"id":"set-array","objectClass":"JSON","parameters":{"path":"\".authors\"","size":"0"}},{"id":"split-string","objectClass":"bookAuthors","parameters":{"string":"Array.At(1, loopindex(\"book\"))","separator":"\",\"","type":"string"}},{"id":"set-value","objectClass":"JSON","parameters":{"path":"\".year\"","value":"Array.At(2, loopindex(\"book\"))"}},{"id":"set-value","objectClass":"JSON","parameters":{"path":"\".price\"","value":"Array.At(3, loopindex(\"book\"))"}}],"children":[{"eventType":"block","conditions":[{"id":"for-each-element","objectClass":"bookAuthors","parameters":{"axes":"x"}}],"actions":[{"id":"push-value","objectClass":"JSON","parameters":{"where":"back","path":"\".authors\"","value":"trim(bookAuthors.CurValue)"}}]}]}]}]}]}
-----------------------
Finally, share a little tip.
When I use JSON, I usually put a Text Input object in the scene and set its Type property to Textarea. Then set Text to JSON.ToBeautifiedString. This way you can easily inspect the contents of the JSON object
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"every-tick","objectClass":"System"}],"actions":[{"id":"set-text","objectClass":"TextInput","parameters":{"text":"JSON.ToBeautifiedString"}}]}]}