AnsweredAssumed Answered

Need to accept a JSON input having field which maybe a single object or an array of objects

Question asked by kumara233 on Sep 7, 2018
Latest reply on Sep 7, 2018 by trey.yeager826393

Here is part of the input profile

 

"Parts" : {

   "Part" : {

      "somefield" : "somevalue"

   }

}

 

and sometimes it is :

"Parts" : {

  "Part" : [ 

       {

         "somefield" : "somevalue"

      },

       {

         "somefield" : "somevalue"

      }

   ]

}

 

 

If i set "Part" field as an repeating array, its throwing an error when the input contains just one object. And if i set it to object, its throwing an error when the input contains an array. Any way to resolve this in Boomi?

Outcomes