How to pass array of json objects instead of json object in request body to any api?
-
{
"template": { "name": "/myfolder/mytemplate" }"
"data": {} .............// here i want to pass array instead of object.
}
-
Getting error message : "Request data can not be an array. you should pass an object in request.data input",
-
Hi, as the message states. You need to pass objects to the
request.data
.
You just need to wrap the array into an object with a prop.{ "template": { "name": "/myfolder/mytemplate" }, "data": { "myProp": [1,2,3] } }
-
Thanks Jan for your reply.