[
{ "id": 0, "name": "" },
{ "id": 1, "name": "" }
]
{"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-start-of-layout","objectClass":"System"}],"actions":[{"id":"parse","objectClass":"JSON","parameters":{"data":"\"[]\""}},{"id":"set-array","objectClass":"JSON","parameters":{"path":"\".\"","size":"0"}}],"children":[{"eventType":"block","conditions":[{"id":"repeat","objectClass":"System","parameters":{"count":"2"}}],"actions":[{"id":"push-value","objectClass":"JSON","parameters":{"where":"back","path":"\".\"","value":"0"}},{"id":"set-object","objectClass":"JSON","parameters":{"path":"\".\" & loopindex"}},{"id":"set-value","objectClass":"JSON","parameters":{"path":"StringSub(\".{0}.id\", loopindex)","value":"0"}},{"id":"set-value","objectClass":"JSON","parameters":{"path":"StringSub(\".{0}.name\", loopindex)","value":"\"\""}}]}]}]}
const dataInst = runtime.objects.JSON.getFirstInstance();
const data = [
{ "id": 1, "name": ""},
{ "id": 2, "name": ""},
]
dataInst.setJsonDataCopy(data);