Forum Discussion

Shalini_Med's avatar
Shalini_Med
Frequent Visitor
10 years ago

In SoapUI NG, How can pass an array (Key, Value) within an array?

Hello,

 

I am new to SoapUI NG.

 

I am using a Post http method to create a record using REST API. How do I pass value (key, value) to an array within in an array? Please find below the Request body of one of the property in an API and the parameter description.

features: [

{

name: "string",

functions: [ "string" ]

}

]

 

features: Array of features to define mapping between features and functions

features.$.name : String name of the feature.

features.$.functions : Array of function names please let me know if you have any questions.

 

I know that there is work around to pass multiple values to an array in API using SOAP UI request form. (multiple values: fieldname=value&fieldname=value and single value: fieldname=value&fieldname=). Wanting to see if there is a similar work around. If not, can you please suggest if there is any other approach.

 

Regards

Shalini

1 Reply

  • nmrao's avatar
    nmrao
    Community Hero

    Do you mean, you want something like below?

     

    features: [
       {
          name: "feature1",
          functions: [ "function1a", "function1b" ]
       },
       {
          name: "feature2",
          functions: [ "function1a", "function2b", "function2c" ]
       }
    ]