How to configure a collection to WebAPI request with JSON template?

Manikanta

Member
How to map a collection to Web API request with JSON template?
From example I have the following JSON Template & I want to map it to collection:

{
"SourceFiles": [
{
"Field1": "[Field1Value]",
"Field2": "[Field2Value]",

}
]
}


I have a collection which have values of "Field1" and "Field2".
How I can map the collection values to the above template?



Thanks in advance
 

ewilson

Member
Assuming you have multiple rows in your Collection, you do not want to use the Template body option. Instead, you would want to use the Custom Code body option and write C# or VB code to build the JSON body, populating it with each record.

Cheers,
Eric
 
Top