AnsweredAssumed Answered

Assemble three JSON segments into an array...

Question asked by Scott V on Aug 14, 2017
Latest reply on Aug 14, 2017 by fmpdude

I have three pieces of JSON I have assembled successfully (props to FM 16).  Simplified version below. What I'm now trying to execute is assembling a single JSON file as such where the three elements are inserted into an array object called "instances".

 

{

     "instances":

     [

          {

               "id": "test 1 2 3",

               "name": "test 4 5 6"

          },

          {    

               "id": "test 7 8 9",

               "name": "test 10 11 12"

          },

          {    

               "id": "test 13 14 15",

               "name": "test 16 17 18"

           }

     ]

}

 

Is this not just an array with three entries? I've tried all manner of JSONSetElement syntax settings to no avail. I can't seem to force the "objects" into an array.

 

Any ideas or suggestions? Thnx.

Scott

 

 

$JSON1 =

          {

               "id": "test 1 2 3",

               "name": "test 4 5 6"

          },

 

$JSON2 =

          {    

               "id": "test 7 8 9",

               "name": "test 10 11 12"

          },

 

$JSON3 =

          {    

               "id": "test 13 14 15",

               "name": "test 16 17 18"

           }

Outcomes