Forum Discussion

NagVenugopal's avatar
NagVenugopal
New Member
3 days ago

Dynamic array for the field within request node

Hello,

I have API request in JSON in below format for which I'm using sourcing data from excel. I need to dynamically generate the "address" field in request under "to" node based on the number of email address I pass in excel. I defined email address in array["email1","email2"] but the groovy to generate "address" in request and mapping to "to" is not working.

 "to" : [
      {
         "address" : "email1"
      }
,
      {
         "address" : "email2"
      }

   ]

No RepliesBe the first to reply