File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -584,7 +584,7 @@ This example shows the . notation access of data inside an json object in chatsc
584584 name: $$tmp.name, phone: $$tmp.phone
585585
586586
587- ### Arrays ( of objects)
587+ ### Arrays of objects
588588
589589In the example below, we add two items into an array of objects and we display the formatted array:
590590
@@ -593,10 +593,9 @@ u: ( testcase4 )
593593 # create a phoneBook as an array of structured items (objects)
594594 $$phoneBook = ^jsoncreate(array)
595595
596+ #
596597 # add first object in the array
597- $$i = 0
598-
599- # create an object
598+ #
600599 $$item = ^jsoncreate(object)
601600
602601 # assign values
@@ -605,10 +604,9 @@ u: ( testcase4 )
605604
606605 ^jsonarrayinsert($$phoneBook $$item)
607606
607+ #
608608 # add a second object in the array
609- $$i = 1
610-
611- # create an object
609+ #
612610 $$item = ^jsoncreate(object)
613611
614612 # assign values
@@ -621,7 +619,7 @@ u: ( testcase4 )
621619 ^jsontree( $$phoneBook ) \n
622620
623621 #
624- # show all items in the phone book
622+ # print formatted items in the phone book
625623 #
626624 phone book:\n
627625 $$i = 0
You can’t perform that action at this time.
0 commit comments